Skip to content

Commit d257560

Browse files
committed
upgraded to latest CodeMirror and got 4-space tabs working
1 parent c2cb354 commit d257560

6 files changed

Lines changed: 376 additions & 366 deletions

File tree

v3/css/codemirror.css

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
}
1010

1111
.CodeMirror-scroll {
12-
overflow-x: auto;
13-
overflow-y: hidden;
12+
overflow: auto;
1413
height: 300px;
1514
/* This is needed to prevent an IE[67] bug where the scrolled content
1615
is visible outside of the scrolling box. */
@@ -20,13 +19,11 @@
2019

2120
/* Vertical scrollbar */
2221
.CodeMirror-scrollbar {
23-
float: right;
22+
position: absolute;
23+
right: 0; top: 0;
2424
overflow-x: hidden;
2525
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;
26+
z-index: 5;
3027
}
3128
.CodeMirror-scrollbar-inner {
3229
/* This needs to have a nonzero width in order for the scrollbar to appear
@@ -69,10 +66,6 @@
6966
white-space: pre;
7067
cursor: text;
7168
}
72-
.CodeMirror-lines * {
73-
/* Necessary for throw-scrolling to decelerate properly on Safari. */
74-
pointer-events: none;
75-
}
7669

7770
.CodeMirror pre {
7871
-moz-border-radius: 0;
@@ -165,5 +158,16 @@ span.cm-em {font-style: italic;}
165158
span.cm-emstrong {font-style: italic; font-weight: bold;}
166159
span.cm-link {text-decoration: underline;}
167160

161+
span.cm-invalidchar {color: #f00;}
162+
168163
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
169164
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
165+
166+
@media print {
167+
168+
/* Hide the cursor when printing */
169+
.CodeMirror pre.CodeMirror-cursor {
170+
visibility: hidden;
171+
}
172+
173+
}

v3/css/opt-frontend.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,6 @@ button.bigBtn {
7979
margin-right: auto;
8080
}
8181

82+
83+
/* necessary for CodeMirror error line highlighting to work! */
84+
.CodeMirror .errorLine { background: #F89D99 !important; }

v3/css/pytutor.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,3 @@ div.ExecutionVisualizer .ui-slider .ui-slider-handle {
466466
border: 1px solid #999;
467467
}
468468

469-
470-
/* necessary for CodeMirror line highlighting to work! */
471-
div.ExecutionVisualizer .CodeMirror .errorLine { background: #F89D99 !important; }
472-

0 commit comments

Comments
 (0)