Commit 9939c04e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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
parents 74f1da10 25d93987
......@@ -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;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment