File: codemirror.less

package info (click to toggle)
ipython 2.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 28,032 kB
  • ctags: 15,433
  • sloc: python: 73,792; makefile: 428; sh: 297
file content (50 lines) | stat: -rw-r--r-- 1,823 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* The following gets added to the <head> if it is detected that the user has a
 * monospace font with inconsistent normal/bold/italic height.  See
 * notebookmain.js.  Such fonts will have keywords vertically offset with
 * respect to the rest of the text.  The user should select a better font.
 * See: https://github.com/ipython/ipython/issues/1503
 *
 * .CodeMirror span {
 *      vertical-align: bottom;
 * }
 */

.CodeMirror {
    line-height: @code_line_height;  /* Changed from 1em to our global default */
    height: auto;     /* Changed to auto to autogrow */
    background: none;  /* Changed from white to allow our bg to show through */
}

.CodeMirror-scroll {
    /*  The CodeMirror docs are a bit fuzzy on if overflow-y should be hidden or visible.*/
    /*  We have found that if it is visible, vertical scrollbars appear with font size changes.*/
    overflow-y: hidden;
    overflow-x: auto;
}

.CodeMirror-lines {
    /* In CM2, this used to be 0.4em, but in CM3 it went to 4px. We need the em value because */
    /* we have set a different line-height and want this to scale with that. */
    padding: @code_padding;
}

.CodeMirror-linenumber {
    // This is needed to fine tune the position of the line numbers because we use the 0.4em in @code_padding
    // spacing in various places. Fine tuned to look right.
    padding: 0 8px 0 4px;
}

.CodeMirror-gutters {
    // This is needed because our cell has rounded corners, otherwise the gutter area square
    // corner cuts into the rounded cell border.
    border-bottom-left-radius: @baseBorderRadius;
    border-top-left-radius: @baseBorderRadius;
}

.CodeMirror pre {
    /* In CM3 this went to 4px from 0 in CM2. We need the 0 value because of how we size */
    /* .CodeMirror-lines */
    padding: 0;
    border: 0;
    .border-radius(0)
}