This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Fixed broken scrolling/scroll bars in Code Injection inputs
closes TryGhost/Ghost#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
- Loading branch information
1 parent
7089e6a
commit 0620979
Showing
5 changed files
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* 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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters