diff options
author | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2016-11-07 13:06:20 -0600 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2016-11-07 13:06:20 -0600 |
commit | e5b1f0e93b9b6037a3993c86a7ea099592863622 (patch) | |
tree | 164dc17879bdc03b5077d3d127f890e2b7fcfdb8 | |
parent | 46a643f71b268759c94b2573e77ac2f6241a5e56 (diff) | |
download | gitlab-ce-bengood/gitlab-ce-table-view.tar.gz |
Align line-numbers with CSV content; scroll on overflowbengood/gitlab-ce-table-view
-rw-r--r-- | app/assets/stylesheets/framework/files.scss | 18 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/highlight.scss | 7 | ||||
-rw-r--r-- | app/views/shared/_file_highlight.html.haml | 2 |
3 files changed, 25 insertions, 2 deletions
diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss index b35ffdd8274..87bbcaca2a9 100644 --- a/app/assets/stylesheets/framework/files.scss +++ b/app/assets/stylesheets/framework/files.scss @@ -172,9 +172,21 @@ table.csv { border-collapse: collapse; display: inline; + border: 0; th { font-weight: bold; + border-top: 0; + } + + th, + td { + &:first-of-type { + border-left: 0; + } + &:last-of-type { + border-right: 0; + } } } } @@ -191,3 +203,9 @@ span.idiff { border-bottom-right-radius: 2px; } } + +.blob-content { + white-space: nowrap; + overflow: auto; + border-left: 1px solid $table-border-gray; +} diff --git a/app/assets/stylesheets/framework/highlight.scss b/app/assets/stylesheets/framework/highlight.scss index 07c8874bf03..3147c3c0628 100644 --- a/app/assets/stylesheets/framework/highlight.scss +++ b/app/assets/stylesheets/framework/highlight.scss @@ -17,7 +17,6 @@ overflow-y: hidden; white-space: pre; word-wrap: normal; - border-left: 1px solid; code { display: inline-block; @@ -43,6 +42,12 @@ text-align: right; float: left; + &.table-numbers { + a { + height: 38px; + } + } + a { font-family: $monospace_font; display: block; diff --git a/app/views/shared/_file_highlight.html.haml b/app/views/shared/_file_highlight.html.haml index 33bfc7a886c..419c28c6b1e 100644 --- a/app/views/shared/_file_highlight.html.haml +++ b/app/views/shared/_file_highlight.html.haml @@ -1,7 +1,7 @@ - repository = nil unless local_assigns.key?(:repository) .file-content.code.js-syntax-highlight - .line-numbers + .line-numbers{class: ('table-numbers' if blob.csv?)} - if blob.data.present? - link_icon = icon('link') - link = blob_link if defined?(blob_link) |