Skip to content

Commit

Permalink
Merge pull request #2880 from jcb91/codemirror_ruler
Browse files Browse the repository at this point in the history
fix codemirror.less to match CodeMirror's expected padding layout
  • Loading branch information
rgbkrk authored Sep 30, 2017
2 parents b884ff9 + df19a51 commit 099f83e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions notebook/static/notebook/less/codemirror.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
.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;
/* Note that this should set vertical padding only, since CodeMirror assumes
that horizontal padding will be set on CodeMirror pre */
padding: @code_padding 0;
}

.CodeMirror-linenumber {
Expand All @@ -43,9 +45,9 @@
}

.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;
/* In CM3 this went to 4px from 0 in CM2. This sets horizontal padding only,
use .CodeMirror-lines for vertical */
padding: 0 @code_padding;
border: 0;
.border-radius(0)
}
Expand Down

0 comments on commit 099f83e

Please sign in to comment.