Skip to content

Commit f5fb7e9

Browse files
committed
CSS hack to make sure visible non-wrapped content can always be scrolled into view
(Even when the widest-line heuristic goes wrong.)
1 parent 3c36093 commit f5fb7e9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/codemirror.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,16 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
192192
white-space: pre-wrap;
193193
word-break: normal;
194194
}
195+
.CodeMirror-code pre {
196+
border-right: 30px solid transparent;
197+
width: -webkit-fit-content;
198+
width: -moz-fit-content;
199+
width: fit-content;
200+
}
201+
.CodeMirror-wrap .CodeMirror-code pre {
202+
border-right: none;
203+
width: auto;
204+
}
195205
.CodeMirror-linebackground {
196206
position: absolute;
197207
left: 0; right: 0; top: 0; bottom: 0;

0 commit comments

Comments
 (0)