From a1d45cf047bebfe05280b009241a0b40c3c0038d Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke <marijnh@gmail.com> Date: Wed, 25 Feb 2015 12:17:46 +0100 Subject: [PATCH] Also force box-sizing: content-box for CodeMirror-gutters Issue #3098 --- lib/codemirror.css | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/codemirror.css b/lib/codemirror.css index 1902ba4ab..a27d83f8b 100644 --- a/lib/codemirror.css +++ b/lib/codemirror.css @@ -33,8 +33,6 @@ min-width: 20px; text-align: right; color: #999; - -moz-box-sizing: content-box; - box-sizing: content-box; } .CodeMirror-guttermarker { color: black; } @@ -154,14 +152,10 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} height: 100%; outline: none; /* Prevent dragging from highlighting the element */ position: relative; - -moz-box-sizing: content-box; - box-sizing: content-box; } .CodeMirror-sizer { position: relative; border-right: 30px solid transparent; - -moz-box-sizing: content-box; - box-sizing: content-box; } /* The fake, visible scrollbars. Used to force redraw during scrolling @@ -196,8 +190,6 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} .CodeMirror-gutter { white-space: normal; height: 100%; - -moz-box-sizing: content-box; - box-sizing: content-box; display: inline-block; margin-bottom: -30px; /* Hack to make IE7 behave */ @@ -265,6 +257,16 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} outline: none; } +/* Force content-box sizing for the elements where we expect it */ +.CodeMirror-scroll, +.CodeMirror-sizer, +.CodeMirror-gutter, +.CodeMirror-gutters, +.CodeMirror-linenumber { + -moz-box-sizing: content-box; + box-sizing: content-box; +} + .CodeMirror-measure { position: absolute; width: 100%; -- GitLab