Move some custom cm CSS to text_editor instead

Although `front_end/cm/codemirror.css` contains some DevTools-specific
tweaks, we should generally treat it like a rolled-in upstream
dependency. This patch moves some of its custom tweaks to
`front_end/text_editor/cmdevtools.css` instead.

Bug: chromium:1076825
Change-Id: Ie4c0cad9d0917186bde57b2027254998198e69d5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2474656
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
This commit is contained in:
Mathias Bynens
2020-10-15 10:43:13 +00:00
committed by Commit Bot
parent 179979c8b3
commit dab0f8bdff
3 changed files with 10 additions and 4 deletions
+3
View File
@@ -0,0 +1,3 @@
Treat `codemirror.css` like a rolled-in upstream dependency. Instead of changing it directly, consider changing `front_end/text_editor/cmdevtools.css` instead.
[Issue #1076825](https://bugs.chromium.org/p/chromium/issues/detail?id=1076825) tracks the effort to use the upstream file more directly.
+2 -4
View File
@@ -191,8 +191,6 @@ div.CodeMirror-dragcursors {
.cm-tab-wrap-hack:after { content: ''; }
/* Help users use markselection to safely style text background */
span.CodeMirror-selectedtext { background: none; }
.-theme-with-dark-background span.CodeMirror-selectedtext {
background: #000;
span.CodeMirror-selectedtext {
background: none;
}
+5
View File
@@ -628,6 +628,11 @@ div.CodeMirror:focus-within span.CodeMirror-nonmatchingbracket {
background-color: #454545;
}
.-theme-with-dark-background span.CodeMirror-selectedtext,
:host-context(.-theme-with-dark-background) span.CodeMirror-selectedtext {
background: #000;
}
.CodeMirror .auto-complete-text {
color: rgb(128 128 128);
}