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