Ghost/ghost/admin/app/styles/components/codemirror.css
Kevin Ansfield 61513ac366 🐛 Fixed broken scrolling/scroll bars in Code Injection inputs
closes https://github.com/TryGhost/Ghost/issues/9635
- CodeMirror expects default CSS box-sizing rather than `border-box` so it's scroll calculations were thrown off
- reset the `box-sizing` properties on CM elements
- remove now unnecessary  `.CodeMirror-scroll` patches that we'd put in place to cover broken scroll behaviour
- move all non-layout-specific CM styles into a `components/codemirror.css` file
2018-06-04 13:29:28 +01:00

19 lines
392 B
CSS

/* Exclude CodeMirror from the border-box reset to avoid scrollbar problems */
.CodeMirror,
.CodeMirror * {
box-sizing: initial;
}
/* Re-apply CodeMirror's content-box styles overridden by above reset */
.CodeMirror-scroll,
.CodeMirror-sizer,
.CodeMirror-gutter,
.CodeMirror-gutters,
.CodeMirror-linenumber {
box-sizing: content-box;
}
.CodeMirror-linenumber {
min-width: 13px;
}