summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-31 07:54:50 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-31 07:54:50 +0000
commit9939c04e1808703c801327000ea8f99f33d8e936 (patch)
tree46e8dc916a50baf26632f86d11604ec20771139e
parent74f1da10d1e6923c347426de9603df7bd8919e09 (diff)
parent25d93987d4667ad1aa1d9550117685ce14f9d5cb (diff)
downloadgitlab-ce-9939c04e1808703c801327000ea8f99f33d8e936.tar.gz
Merge branch 'fix/line-numbers' into 'master'
Fix shifting line numbers. When there are 1000 lines or more in a file, the link icon causes the numbers to shift down a line when you hover over the line number. This fixes that issue by setting a `nowrap` option for the line number anchor tag. I also removed the fixed width of 60px for the `line-numbers` div as this causes issues for longer line numbers. I used `visibility: hidden` instead of `display: none` to ensure that the space for the link icon is taken into account. This way auto sizing the div does not cause any problems. You can see the current behavior by looking at the following: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/vendor/assets/javascripts/ace-src-noconflict/mode-java.js
-rw-r--r--app/assets/stylesheets/generic/highlight.scss7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/assets/stylesheets/generic/highlight.scss b/app/assets/stylesheets/generic/highlight.scss
index f8316caca97..4110bddf4f3 100644
--- a/app/assets/stylesheets/generic/highlight.scss
+++ b/app/assets/stylesheets/generic/highlight.scss
@@ -33,20 +33,21 @@
padding: 10px;
text-align: right;
float: left;
- width: 60px;
a {
font-family: $monospace_font;
display: block;
font-size: 12px !important;
line-height: 16px !important;
+ white-space: nowrap;
i {
- display: none;
+ visibility: hidden;
+ @extend .pull-left;
}
&:hover i {
- display: inline;
+ visibility: visible;
}
}
}