1.CodeMirror {
2  line-height: 1em;
3  font-family: monospace;
4
5  /* Necessary so the scrollbar can be absolutely positioned within the wrapper on Lion. */
6  position: relative;
7  /* This prevents unwanted scrollbars from showing up on the body and wrapper in IE. */
8  overflow: hidden;
9}
10
11.CodeMirror-scroll {
12  overflow-x: auto;
13  overflow-y: hidden;
14  height: 300px;
15  /* This is needed to prevent an IE[67] bug where the scrolled content
16     is visible outside of the scrolling box. */
17  position: relative;
18  outline: none;
19}
20
21/* Vertical scrollbar */
22.CodeMirror-scrollbar {
23  float: right;
24  overflow-x: hidden;
25  overflow-y: scroll;
26
27  /* This corrects for the 1px gap introduced to the left of the scrollbar
28     by the rule for .CodeMirror-scrollbar-inner. */
29  margin-left: -1px;
30}
31.CodeMirror-scrollbar-inner {
32  /* This needs to have a nonzero width in order for the scrollbar to appear
33     in Firefox and IE9. */
34  width: 1px;
35}
36.CodeMirror-scrollbar.cm-sb-overlap {
37  /* Ensure that the scrollbar appears in Lion, and that it overlaps the content
38     rather than sitting to the right of it. */
39  position: absolute;
40  z-index: 1;
41  float: none;
42  right: 0;
43  min-width: 12px;
44}
45.CodeMirror-scrollbar.cm-sb-nonoverlap {
46  min-width: 12px;
47}
48.CodeMirror-scrollbar.cm-sb-ie7 {
49  min-width: 18px;
50}
51
52.CodeMirror-gutter {
53  position: absolute; left: 0; top: 0;
54  z-index: 10;
55  background-color: #f7f7f7;
56  border-right: 1px solid #eee;
57  min-width: 2em;
58  height: 100%;
59}
60.CodeMirror-gutter-text {
61  color: #aaa;
62  text-align: right;
63  padding: .4em .2em .4em .4em;
64  white-space: pre !important;
65  cursor: default;
66}
67.CodeMirror-lines {
68  padding: .4em;
69  white-space: pre;
70  cursor: text;
71}
72.CodeMirror-lines * {
73  /* Necessary for throw-scrolling to decelerate properly on Safari. */
74  pointer-events: none;
75}
76
77.CodeMirror pre {
78  -moz-border-radius: 0;
79  -webkit-border-radius: 0;
80  -o-border-radius: 0;
81  border-radius: 0;
82  border-width: 0; margin: 0; padding: 0; background: transparent;
83  font-family: inherit;
84  font-size: inherit;
85  padding: 0; margin: 0;
86  white-space: pre;
87  word-wrap: normal;
88  line-height: inherit;
89  color: inherit;
90}
91
92.CodeMirror-wrap pre {
93  word-wrap: break-word;
94  white-space: pre-wrap;
95  word-break: normal;
96}
97.CodeMirror-wrap .CodeMirror-scroll {
98  overflow-x: hidden;
99}
100
101.CodeMirror textarea {
102  outline: none !important;
103}
104
105.CodeMirror pre.CodeMirror-cursor {
106  z-index: 10;
107  position: absolute;
108  visibility: hidden;
109  border-left: 1px solid black;
110  border-right: none;
111  width: 0;
112}
113.cm-keymap-fat-cursor pre.CodeMirror-cursor {
114  width: auto;
115  border: 0;
116  background: transparent;
117  background: rgba(0, 200, 0, .4);
118  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
119}
120/* Kludge to turn off filter in ie9+, which also accepts rgba */
121.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) {
122  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
123}
124.CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {}
125.CodeMirror-focused pre.CodeMirror-cursor {
126  visibility: visible;
127}
128
129div.CodeMirror-selected { background: #d9d9d9; }
130.CodeMirror-focused div.CodeMirror-selected { background: #d7d4f0; }
131
132.CodeMirror-searching {
133  background: #ffa;
134  background: rgba(255, 255, 0, .4);
135}
136
137/* Default theme */
138
139.cm-s-default span.cm-keyword {color: #708;}
140.cm-s-default span.cm-atom {color: #219;}
141.cm-s-default span.cm-number {color: #164;}
142.cm-s-default span.cm-def {color: #00f;}
143.cm-s-default span.cm-variable {color: black;}
144.cm-s-default span.cm-variable-2 {color: #05a;}
145.cm-s-default span.cm-variable-3 {color: #085;}
146.cm-s-default span.cm-property {color: black;}
147.cm-s-default span.cm-operator {color: black;}
148.cm-s-default span.cm-comment {color: #a50;}
149.cm-s-default span.cm-string {color: #a11;}
150.cm-s-default span.cm-string-2 {color: #f50;}
151.cm-s-default span.cm-meta {color: #555;}
152.cm-s-default span.cm-error {color: #f00;}
153.cm-s-default span.cm-qualifier {color: #555;}
154.cm-s-default span.cm-builtin {color: #30a;}
155.cm-s-default span.cm-bracket {color: #cc7;}
156.cm-s-default span.cm-tag {color: #170;}
157.cm-s-default span.cm-attribute {color: #00c;}
158.cm-s-default span.cm-header {color: blue;}
159.cm-s-default span.cm-quote {color: #090;}
160.cm-s-default span.cm-hr {color: #999;}
161.cm-s-default span.cm-link {color: #00c;}
162
163span.cm-header, span.cm-strong {font-weight: bold;}
164span.cm-em {font-style: italic;}
165span.cm-emstrong {font-style: italic; font-weight: bold;}
166span.cm-link {text-decoration: underline;}
167
168div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
169div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}