Skip to content

Commit 0ec5d51

Browse files
committed
Use CSS variables for output error highlighting
1 parent 227b0d8 commit 0ec5d51

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

ui/frontend/index.module.css

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@
103103
/* Output tabs */
104104
--output-background-tab: #fcfcfc;
105105
--output-current-tab: #f9ffff;
106+
107+
/* Output compiler highlighting */
108+
--output-highlight-error-color: #bf1b1b;
109+
--output-highlight-warning-color: #f79a06;
106110
}
107111

108112
@define-mixin dark-theme-vars {
@@ -144,6 +148,12 @@
144148
/* Output tabs */
145149
--output-background-tab: #191b1c;
146150
--output-current-tab: #343434;
151+
152+
/* Output compiler highlighting */
153+
--output-highlight-warning-color: #ffe800;
154+
--output-highlight-warning-bg-color: #330;
155+
--output-highlight-error-color: #f5f5f5;
156+
--output-highlight-error-bg-color: #820000;
147157
}
148158

149159
:root,
@@ -200,10 +210,12 @@ body {
200210
/* stylelint-disable-next-line selector-class-pattern */
201211
:global(.language-rust_errors) {
202212
& :global(.warning) {
203-
color: #f79a06;
213+
color: var(--output-highlight-warning-color);
214+
background-color: var(--output-highlight-warning-bg-color);
204215
}
205216

206217
& :global(.error) {
207-
color: #bf1b1b;
218+
color: var(--output-highlight-error-color);
219+
background-color: var(--output-highlight-error-bg-color);
208220
}
209221
}

0 commit comments

Comments
 (0)