Title: [237125] trunk/Source/WebInspectorUI
Revision
237125
Author
nvasil...@apple.com
Date
2018-10-15 10:27:02 -0700 (Mon, 15 Oct 2018)

Log Message

Web Inspector: Dark Mode: style editor warnings should not look like errors
https://bugs.webkit.org/show_bug.cgi?id=190569
<rdar://problem/45261689>

Reviewed by Matt Baker.

Make warnings in the style editor look the same as warnings in the content views.
Unify warning and error background color variables.

* UserInterface/Views/LogContentView.css:
(@media (prefers-dark-interface)):
(.console-error-level):
(.console-warning-level):
* UserInterface/Views/SourceCodeTextEditor.css:
(.source-code.text-editor > .CodeMirror .warning):
(.source-code.text-editor > .CodeMirror .error):
(.source-code.text-editor > .CodeMirror .issue-widget.warning):
(.source-code.text-editor > .CodeMirror .issue-widget.inline.warning):
(.source-code.text-editor > .CodeMirror .issue-widget.error):
(.source-code.text-editor > .CodeMirror .issue-widget.inline.error):
(@media (prefers-dark-interface)):
(.source-code.text-editor > .CodeMirror .issue-widget):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.spreadsheet-style-declaration-editor .property.has-warning):
(.spreadsheet-style-declaration-editor .property.has-warning .warning):
(@media (prefers-dark-interface)):
(.spreadsheet-style-declaration-editor :matches(.name, .value).editing):
* UserInterface/Views/Variables.css:
(:root):
(@media (prefers-dark-interface)):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (237124 => 237125)


--- trunk/Source/WebInspectorUI/ChangeLog	2018-10-15 17:25:50 UTC (rev 237124)
+++ trunk/Source/WebInspectorUI/ChangeLog	2018-10-15 17:27:02 UTC (rev 237125)
@@ -1,3 +1,36 @@
+2018-10-15  Nikita Vasilyev  <nvasil...@apple.com>
+
+        Web Inspector: Dark Mode: style editor warnings should not look like errors
+        https://bugs.webkit.org/show_bug.cgi?id=190569
+        <rdar://problem/45261689>
+
+        Reviewed by Matt Baker.
+
+        Make warnings in the style editor look the same as warnings in the content views.
+        Unify warning and error background color variables.
+
+        * UserInterface/Views/LogContentView.css:
+        (@media (prefers-dark-interface)):
+        (.console-error-level):
+        (.console-warning-level):
+        * UserInterface/Views/SourceCodeTextEditor.css:
+        (.source-code.text-editor > .CodeMirror .warning):
+        (.source-code.text-editor > .CodeMirror .error):
+        (.source-code.text-editor > .CodeMirror .issue-widget.warning):
+        (.source-code.text-editor > .CodeMirror .issue-widget.inline.warning):
+        (.source-code.text-editor > .CodeMirror .issue-widget.error):
+        (.source-code.text-editor > .CodeMirror .issue-widget.inline.error):
+        (@media (prefers-dark-interface)):
+        (.source-code.text-editor > .CodeMirror .issue-widget):
+        * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
+        (.spreadsheet-style-declaration-editor .property.has-warning):
+        (.spreadsheet-style-declaration-editor .property.has-warning .warning):
+        (@media (prefers-dark-interface)):
+        (.spreadsheet-style-declaration-editor :matches(.name, .value).editing):
+        * UserInterface/Views/Variables.css:
+        (:root):
+        (@media (prefers-dark-interface)):
+
 2018-10-12  Devin Rousso  <drou...@apple.com>
 
         Web Inspector: Canvas: previews aren't removed when the parent view is hidden

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css (237124 => 237125)


--- trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css	2018-10-15 17:25:50 UTC (rev 237124)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css	2018-10-15 17:27:02 UTC (rev 237125)
@@ -290,7 +290,7 @@
     }
 
     .console-error-level {
-        background-color: var(--error-background-color);
+        background-color: var(--error-background-color-secondary);
         border-color: var(--border-color-error);
     }
 
@@ -299,7 +299,7 @@
     }
 
     .console-warning-level {
-        background-color: var(--warning-background-color);
+        background-color: var(--warning-background-color-secondary);
         border-color: var(--border-color-warning);
     }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.css (237124 => 237125)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.css	2018-10-15 17:25:50 UTC (rev 237124)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.css	2018-10-15 17:27:02 UTC (rev 237125)
@@ -30,11 +30,11 @@
 }
 
 .source-code.text-editor > .CodeMirror .warning {
-    background-color: hsl(51, 87%, 93%);
+    background-color: var(--warning-background-color-secondary);
 }
 
 .source-code.text-editor > .CodeMirror .error {
-    background-color: hsl(15, 100%, 90%);
+    background-color: var(--error-background-color-secondary);
 }
 
 .source-code.text-editor > .CodeMirror .thread-indicator {
@@ -88,19 +88,19 @@
 }
 
 .source-code.text-editor > .CodeMirror .issue-widget.warning {
-    background-color: hsl(51, 87%, 93%);
+    background-color: var(--warning-background-color-secondary);
 }
 
 .source-code.text-editor > .CodeMirror .issue-widget.inline.warning {
-    background-color: hsl(43, 97%, 84%);
+    background-color: var(--warning-background-color);
 }
 
 .source-code.text-editor > .CodeMirror .issue-widget.error {
-    background-color: hsl(15, 100%, 90%);
+    background-color: var(--error-background-color-secondary);
 }
 
 .source-code.text-editor > .CodeMirror .issue-widget.inline.error {
-    background-color: hsl(11, 100%, 80%);
+    background-color: var(--error-background-color);
 }
 
 .source-code.text-editor > .CodeMirror .thread-widget {
@@ -184,30 +184,10 @@
 }
 
 @media (prefers-dark-interface) {
-    .source-code.text-editor > .CodeMirror .error {
-        background-color: var(--error-background-color);
-    }
-
-    .source-code.text-editor > .CodeMirror .warning {
-        background-color: var(--warning-background-color);
-    }
-
     .source-code.text-editor > .CodeMirror .issue-widget {
         color: hsl(0, 0%, var(--foreground-lightness));
-        --warning-background-color: hsl(43, 100%, 23%);
-        --error-background-color: hsl(11, 70%, 32%);
     }
 
-    .source-code.text-editor > .CodeMirror .issue-widget.warning,
-    .source-code.text-editor > .CodeMirror .issue-widget.inline.warning {
-        background-color: var(--warning-background-color);
-    }
-
-    .source-code.text-editor > .CodeMirror .issue-widget.error,
-    .source-code.text-editor > .CodeMirror .issue-widget.inline.error {
-        background-color: var(--error-background-color);
-    }
-
     .source-code.text-editor > .CodeMirror .thread-widget.inline {
         background-color: hsl(99, 85%, 34%);
     }

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css (237124 => 237125)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css	2018-10-15 17:25:50 UTC (rev 237124)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css	2018-10-15 17:27:02 UTC (rev 237125)
@@ -100,7 +100,7 @@
 }
 
 .spreadsheet-style-declaration-editor .property.has-warning {
-    background-color: hsl(51, 87%, 93%);
+    background-color: var(--warning-background-color-secondary);
 }
 
 .spreadsheet-style-declaration-editor .property .warning {
@@ -115,7 +115,7 @@
     height: 13px;
 
     background-image: url(../Images/Warning.svg);
-    background-color: hsl(43, 97%, 84%);
+    background-color: var(--warning-background-color);
     background-repeat: no-repeat;
     background-size: 9px;
     background-position-y: center;
@@ -163,12 +163,4 @@
     .spreadsheet-style-declaration-editor :matches(.name, .value).editing {
         outline-color: var(--background-color-secondary) !important;
     }
-
-    .spreadsheet-style-declaration-editor .property.has-warning {
-        background-color: hsl(2, 50%, 25%);
-    }
-
-    .spreadsheet-style-declaration-editor .property.has-warning .warning {
-        filter: invert(100%) hue-rotate(150deg);
-    }
 }

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Variables.css (237124 => 237125)


--- trunk/Source/WebInspectorUI/UserInterface/Views/Variables.css	2018-10-15 17:25:50 UTC (rev 237124)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Variables.css	2018-10-15 17:27:02 UTC (rev 237125)
@@ -66,6 +66,11 @@
     --panel-background-color: hsl(0, 0%, 93%);
     --panel-background-color-light: hsl(0, 0%, 96%);
 
+    --warning-background-color: hsl(43, 97%, 84%);
+    --warning-background-color-secondary: hsl(51, 87%, 93%);
+    --error-background-color: hsl(11, 100%, 80%);
+    --error-background-color-secondary: hsl(15, 100%, 90%);
+
     --console-secondary-text-color: hsla(0, 0%, 0%, 0.33);
     --console-prompt-min-height: 30px;
 
@@ -236,8 +241,10 @@
 
         --console-secondary-text-color: hsla(0, 0%, 100%, 0.45);
 
-        --warning-background-color: hsla(21, 100%, 51%, 0.12);
-        --error-background-color: hsla(0, 100%, 50%, 0.15);
+        --warning-background-color: hsl(43, 100%, 23%);
+        --warning-background-color-secondary: hsl(21, 18%, 25%);
+        --error-background-color: hsl(11, 70%, 32%);
+        --error-background-color-secondary: hsl(6, 23%, 25%);
 
         --network-header-color: hsl(204, 52%, 55%);
         --network-system-color: hsl(79, 95%, 50%);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to