Show More
@@ -1,58 +1,50 | |||||
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 url-prefix() { |
|
|||
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 */ |
|
|||
28 | .CodeMirror-scroll { |
|
|||
29 | overflow-x: hidden; |
|
|||
30 | } |
|
|||
31 | } |
|
|||
32 |
|
||||
33 | .CodeMirror-lines { |
|
25 | .CodeMirror-lines { | |
34 | /* In CM2, this used to be 0.4em, but in CM3 it went to 4px. We need the em value because */ |
|
26 | /* 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. */ |
|
27 | /* we have set a different line-height and want this to scale with that. */ | |
36 | padding: @code_padding; |
|
28 | padding: @code_padding; | |
37 | } |
|
29 | } | |
38 |
|
30 | |||
39 | .CodeMirror-linenumber { |
|
31 | .CodeMirror-linenumber { | |
40 | // This is needed to fine tune the position of the line numbers because we use the 0.4em in @code_padding |
|
32 | // 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. |
|
33 | // spacing in various places. Fine tuned to look right. | |
42 | padding: 0 8px 0 4px; |
|
34 | padding: 0 8px 0 4px; | |
43 | } |
|
35 | } | |
44 |
|
36 | |||
45 | .CodeMirror-gutters { |
|
37 | .CodeMirror-gutters { | |
46 | // This is needed because our cell has rounded corners, otherwise the gutter area square |
|
38 | // This is needed because our cell has rounded corners, otherwise the gutter area square | |
47 | // corner cuts into the rounded cell border. |
|
39 | // corner cuts into the rounded cell border. | |
48 | border-bottom-left-radius: @baseBorderRadius; |
|
40 | border-bottom-left-radius: @baseBorderRadius; | |
49 | border-top-left-radius: @baseBorderRadius; |
|
41 | border-top-left-radius: @baseBorderRadius; | |
50 | } |
|
42 | } | |
51 |
|
43 | |||
52 | .CodeMirror pre { |
|
44 | .CodeMirror pre { | |
53 | /* In CM3 this went to 4px from 0 in CM2. We need the 0 value because of how we size */ |
|
45 | /* In CM3 this went to 4px from 0 in CM2. We need the 0 value because of how we size */ | |
54 | /* .CodeMirror-lines */ |
|
46 | /* .CodeMirror-lines */ | |
55 | padding: 0; |
|
47 | padding: 0; | |
56 | border: 0; |
|
48 | border: 0; | |
57 | .border-radius(0) |
|
49 | .border-radius(0) | |
58 | } |
|
50 | } |
General Comments 0
You need to be logged in to leave comments.
Login now