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