fix: Extract hardcoded color from syntax.scss
Syntax highlighting is hardcoded to support dark mode so I extract them into variables to enable customization.
This commit is contained in:
@@ -1,8 +1,21 @@
|
||||
:root {
|
||||
--accent: #23B0FF;
|
||||
--accent-contrast-color: black;
|
||||
--article-link-color: var(inherit);
|
||||
--background: color-mix(in srgb, var(--accent) 2%, #1D1E28 98%);
|
||||
--border-color: rgba(255, 255, 255, .1);
|
||||
--color: white;
|
||||
--accent: #23b0ff;
|
||||
--accent-contrast-color: black;
|
||||
--article-link-color: var(inherit);
|
||||
--background: color-mix(in srgb, var(--accent) 2%, #1d1e28 98%);
|
||||
--border-color: rgba(255, 255, 255, 0.1);
|
||||
--color: white;
|
||||
|
||||
// Use in code syntax highlighting
|
||||
--syntax-func-color: color-mix(in srgb, var(--accent) 70%, #999 30%);
|
||||
--syntax-var-color: color-mix(in srgb, var(--accent) 90%, transparent);
|
||||
--syntax-value-color: color-mix(in srgb, var(--accent), white);
|
||||
--syntax-comment-color: rgba(255, 255, 255, 0.3);
|
||||
--syntax-line-highlight-background-color: hsla(24, 20%, 50%, 0.4);
|
||||
--syntax-line-highlight-color: hsl(24, 20%, 95%);
|
||||
--syntax-line-highlight-box-shadow: white;
|
||||
--syntax-code-border-color: rgba(255, 255, 255, 0.1);
|
||||
--syntax-code-copy-button-background: hsla(0, 0%, 87.8%, 0.2);
|
||||
--syntax-code-copy-button-color: #bbb;
|
||||
--syntax-code-copy-button-box-shadow-color: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,21 @@
|
||||
:root {
|
||||
--accent: #78E2A0;
|
||||
--accent-contrast-color: black;
|
||||
--article-link-color: var(inherit);
|
||||
--background: color-mix(in srgb, var(--accent) 2%, #1D1E28 98%);
|
||||
--border-color: rgba(255, 255, 255, .1);
|
||||
--color: white;
|
||||
--accent: #78e2a0;
|
||||
--accent-contrast-color: black;
|
||||
--article-link-color: var(inherit);
|
||||
--background: color-mix(in srgb, var(--accent) 2%, #1d1e28 98%);
|
||||
--border-color: rgba(255, 255, 255, 0.1);
|
||||
--color: white;
|
||||
|
||||
// Use in code syntax highlighting
|
||||
--syntax-func-color: color-mix(in srgb, var(--accent) 70%, #999 30%);
|
||||
--syntax-var-color: color-mix(in srgb, var(--accent) 90%, transparent);
|
||||
--syntax-value-color: color-mix(in srgb, var(--accent), white);
|
||||
--syntax-comment-color: rgba(255, 255, 255, 0.3);
|
||||
--syntax-line-highlight-background-color: hsla(24, 20%, 50%, 0.4);
|
||||
--syntax-line-highlight-color: hsl(24, 20%, 95%);
|
||||
--syntax-line-highlight-box-shadow: white;
|
||||
--syntax-code-border-color: rgba(255, 255, 255, 0.1);
|
||||
--syntax-code-copy-button-background: hsla(0, 0%, 87.8%, 0.2);
|
||||
--syntax-code-copy-button-color: #bbb;
|
||||
--syntax-code-copy-button-box-shadow-color: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,21 @@
|
||||
:root {
|
||||
--accent: #FFA86A;
|
||||
--accent-contrast-color: black;
|
||||
--article-link-color: var(inherit);
|
||||
--background: color-mix(in srgb, var(--accent) 2%, #1D1E28 98%);
|
||||
--border-color: rgba(255, 255, 255, .1);
|
||||
--color: white;
|
||||
--accent: #ffa86a;
|
||||
--accent-contrast-color: black;
|
||||
--article-link-color: var(inherit);
|
||||
--background: color-mix(in srgb, var(--accent) 2%, #1d1e28 98%);
|
||||
--border-color: rgba(255, 255, 255, 0.1);
|
||||
--color: white;
|
||||
|
||||
// Use in code syntax highlighting
|
||||
--syntax-func-color: color-mix(in srgb, var(--accent) 70%, #999 30%);
|
||||
--syntax-var-color: color-mix(in srgb, var(--accent) 90%, transparent);
|
||||
--syntax-value-color: color-mix(in srgb, var(--accent), white);
|
||||
--syntax-comment-color: rgba(255, 255, 255, 0.3);
|
||||
--syntax-line-highlight-background-color: hsla(24, 20%, 50%, 0.4);
|
||||
--syntax-line-highlight-color: hsl(24, 20%, 95%);
|
||||
--syntax-line-highlight-box-shadow: white;
|
||||
--syntax-code-border-color: rgba(255, 255, 255, 0.1);
|
||||
--syntax-code-copy-button-background: hsla(0, 0%, 87.8%, 0.2);
|
||||
--syntax-code-copy-button-color: #bbb;
|
||||
--syntax-code-copy-button-box-shadow-color: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,21 @@
|
||||
:root {
|
||||
--accent: #EE72F1;
|
||||
--accent-contrast-color: black;
|
||||
--article-link-color: var(inherit);
|
||||
--background: color-mix(in srgb, var(--accent) 2%, #1D1E28 98%);
|
||||
--border-color: rgba(255, 255, 255, .1);
|
||||
--color: white;
|
||||
--accent: #ee72f1;
|
||||
--accent-contrast-color: black;
|
||||
--article-link-color: var(inherit);
|
||||
--background: color-mix(in srgb, var(--accent) 2%, #1d1e28 98%);
|
||||
--border-color: rgba(255, 255, 255, 0.1);
|
||||
--color: white;
|
||||
|
||||
// Use in code syntax highlighting
|
||||
--syntax-func-color: color-mix(in srgb, var(--accent) 70%, #999 30%);
|
||||
--syntax-var-color: color-mix(in srgb, var(--accent) 90%, transparent);
|
||||
--syntax-value-color: color-mix(in srgb, var(--accent), white);
|
||||
--syntax-comment-color: rgba(255, 255, 255, 0.3);
|
||||
--syntax-line-highlight-background-color: hsla(24, 20%, 50%, 0.4);
|
||||
--syntax-line-highlight-color: hsl(24, 20%, 95%);
|
||||
--syntax-line-highlight-box-shadow: white;
|
||||
--syntax-code-border-color: rgba(255, 255, 255, 0.1);
|
||||
--syntax-code-copy-button-background: hsla(0, 0%, 87.8%, 0.2);
|
||||
--syntax-code-copy-button-color: #bbb;
|
||||
--syntax-code-copy-button-box-shadow-color: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,21 @@
|
||||
:root {
|
||||
--accent: #FF6266;
|
||||
--accent-contrast-color: black;
|
||||
--article-link-color: var(inherit);
|
||||
--background: color-mix(in srgb, var(--accent) 2%, #1D1E28 98%);
|
||||
--border-color: rgba(255, 255, 255, .1);
|
||||
--color: white;
|
||||
--accent: #ff6266;
|
||||
--accent-contrast-color: black;
|
||||
--article-link-color: var(inherit);
|
||||
--background: color-mix(in srgb, var(--accent) 2%, #1d1e28 98%);
|
||||
--border-color: rgba(255, 255, 255, 0.1);
|
||||
--color: white;
|
||||
|
||||
// Use in code syntax highlighting
|
||||
--syntax-func-color: color-mix(in srgb, var(--accent) 70%, #999 30%);
|
||||
--syntax-var-color: color-mix(in srgb, var(--accent) 90%, transparent);
|
||||
--syntax-value-color: color-mix(in srgb, var(--accent), white);
|
||||
--syntax-comment-color: rgba(255, 255, 255, 0.3);
|
||||
--syntax-line-highlight-background-color: hsla(24, 20%, 50%, 0.4);
|
||||
--syntax-line-highlight-color: hsl(24, 20%, 95%);
|
||||
--syntax-line-highlight-box-shadow: white;
|
||||
--syntax-code-border-color: rgba(255, 255, 255, 0.1);
|
||||
--syntax-code-copy-button-background: hsla(0, 0%, 87.8%, 0.2);
|
||||
--syntax-code-copy-button-color: #bbb;
|
||||
--syntax-code-copy-button-box-shadow-color: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user