Skip to content
Snippets Groups Projects
Commit 084abdaf authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

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

Former-commit-id: 9939c04e
parents 47fa42e7 08740125
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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;
}
}
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment