##// END OF EJS Templates
append Firefox overflow-x fix
juhasch -
Show More
@@ -1,58 +1,58 b''
1 1 /* The following gets added to the <head> if it is detected that the user has a
2 2 * monospace font with inconsistent normal/bold/italic height. See
3 3 * notebookmain.js. Such fonts will have keywords vertically offset with
4 4 * respect to the rest of the text. The user should select a better font.
5 5 * See: https://github.com/ipython/ipython/issues/1503
6 6 *
7 7 * .CodeMirror span {
8 8 * vertical-align: bottom;
9 9 * }
10 10 */
11 11
12 12 .CodeMirror {
13 13 line-height: @code_line_height; /* Changed from 1em to our global default */
14 14 height: auto; /* Changed to auto to autogrow */
15 15 background: none; /* Changed from white to allow our bg to show through */
16 16 }
17 17
18 18 .CodeMirror-scroll {
19 19 /* The CodeMirror docs are a bit fuzzy on if overflow-y should be hidden or visible.*/
20 20 /* We have found that if it is visible, vertical scrollbars appear with font size changes.*/
21 21 overflow-y: hidden;
22 22 overflow-x: auto;
23 23 }
24 24
25 @-moz-document {
25 @-moz-document url-prefix() {
26 26 /* Firefox does weird and terrible things (#3549) when overflow-x is auto */
27 27 /* It doesn't respect the overflow setting anyway, so we can workaround it with this */
28 28 .CodeMirror-scroll {
29 29 overflow-x: hidden;
30 30 }
31 31 }
32 32
33 33 .CodeMirror-lines {
34 34 /* In CM2, this used to be 0.4em, but in CM3 it went to 4px. We need the em value because */
35 35 /* we have set a different line-height and want this to scale with that. */
36 36 padding: @code_padding;
37 37 }
38 38
39 39 .CodeMirror-linenumber {
40 40 // This is needed to fine tune the position of the line numbers because we use the 0.4em in @code_padding
41 41 // spacing in various places. Fine tuned to look right.
42 42 padding: 0 8px 0 4px;
43 43 }
44 44
45 45 .CodeMirror-gutters {
46 46 // This is needed because our cell has rounded corners, otherwise the gutter area square
47 47 // corner cuts into the rounded cell border.
48 48 border-bottom-left-radius: @baseBorderRadius;
49 49 border-top-left-radius: @baseBorderRadius;
50 50 }
51 51
52 52 .CodeMirror pre {
53 53 /* In CM3 this went to 4px from 0 in CM2. We need the 0 value because of how we size */
54 54 /* .CodeMirror-lines */
55 55 padding: 0;
56 56 border: 0;
57 57 .border-radius(0)
58 58 }
General Comments 0
You need to be logged in to leave comments. Login now