2019-12-02 11:52:26 +07:00
|
|
|
// Dark theme (Auto)
|
|
|
|
// Automatically enabled if user has Dark mode enabled
|
2020-09-29 08:38:35 +07:00
|
|
|
|
2019-11-27 15:31:49 +07:00
|
|
|
@media only screen and (prefers-color-scheme: dark) {
|
|
|
|
:root:not([data-theme="light"]) {
|
|
|
|
|
|
|
|
// Document
|
2020-09-29 08:38:35 +07:00
|
|
|
--background: #{darken($grey-900, 6%)};
|
2019-11-27 15:31:49 +07:00
|
|
|
|
|
|
|
// Typography
|
2020-09-29 08:38:35 +07:00
|
|
|
--text: #{$grey-300};
|
|
|
|
--h1: #{$grey-50};
|
|
|
|
--h2: #{$grey-100};
|
|
|
|
--h3: #{$grey-200};
|
|
|
|
--h4: #{$grey-300};
|
|
|
|
--h5: #{$grey-400};
|
|
|
|
--h6: #{$grey-500};
|
2019-11-27 15:31:49 +07:00
|
|
|
|
2019-11-30 12:43:20 +07:00
|
|
|
// Primary Call-to-Action and links
|
2020-09-29 08:38:35 +07:00
|
|
|
--primary: #{$primary-600};
|
2020-09-29 14:54:27 +07:00
|
|
|
--primary-border: var(--primary);
|
2020-09-29 08:38:35 +07:00
|
|
|
--primary-hover: #{$primary-500};
|
2020-09-29 14:54:27 +07:00
|
|
|
--primary-hover-border: var(--primary-hover);
|
2020-09-29 08:38:35 +07:00
|
|
|
--primary-focus: #{rgba($primary-600, .25)};
|
|
|
|
--primary-inverse: #{$white};
|
2019-11-27 15:31:49 +07:00
|
|
|
|
2020-10-09 12:03:52 +07:00
|
|
|
// Secondary Call-to-Action, links and kbd
|
2020-09-29 08:38:35 +07:00
|
|
|
--secondary: #{$grey-600};
|
2020-09-29 14:54:27 +07:00
|
|
|
--secondary-border: var(--secondary);
|
2020-09-29 08:38:35 +07:00
|
|
|
--secondary-hover: #{$grey-500};
|
2020-09-29 14:54:27 +07:00
|
|
|
--secondary-hover-border: var(--secondary-hover);
|
2020-09-29 08:38:35 +07:00
|
|
|
--secondary-focus: #{rgba($grey-600, .25)};
|
|
|
|
--secondary-inverse: #{$white};
|
2019-11-30 12:43:20 +07:00
|
|
|
|
2019-12-02 11:52:26 +07:00
|
|
|
// Contrast Call-to-Action and Tooltips
|
2020-09-29 08:38:35 +07:00
|
|
|
--contrast: #{$grey-100};
|
2020-09-29 14:54:27 +07:00
|
|
|
--contrast-border: var(--contrast);
|
2020-09-29 08:38:35 +07:00
|
|
|
--contrast-hover: #{$white};
|
2020-09-29 14:54:27 +07:00
|
|
|
--contrast-hover-border: var(--contrast-hover);
|
2020-09-29 08:38:35 +07:00
|
|
|
--contrast-focus: #{rgba($grey-600, .25)};
|
|
|
|
--contrast-inverse: #{darken($grey-900, 6%)};
|
2019-11-27 15:31:49 +07:00
|
|
|
|
|
|
|
// Form elements
|
2020-09-29 08:38:35 +07:00
|
|
|
--input-background: #{darken($grey-900, 6%)};
|
|
|
|
--input-border: #{mix($grey-800, $grey-700)};
|
2020-09-29 14:54:27 +07:00
|
|
|
--input-hover-background: var(--input-background);
|
|
|
|
--input-hover-border: var(--primary);
|
2020-09-29 10:53:42 +07:00
|
|
|
--input-focus: var(--primary-focus);
|
|
|
|
--input-inverse: var(--primary-inverse);
|
2020-09-29 08:38:35 +07:00
|
|
|
|
|
|
|
// Button
|
|
|
|
--button-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
|
|
|
|
--button-hover-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
|
2019-11-27 15:31:49 +07:00
|
|
|
|
|
|
|
// Utilities states
|
2020-09-29 08:38:35 +07:00
|
|
|
--valid: #{$green-700};
|
|
|
|
--invalid: #{$red-900};
|
2020-09-30 17:20:28 +07:00
|
|
|
--mark: #{rgba($amber-200, .1875)};
|
2020-09-29 08:38:35 +07:00
|
|
|
--mark-text: #{$white};
|
|
|
|
--muted-text: #{$grey-500};
|
|
|
|
--muted-background: #{mix($grey-800, $grey-900)};
|
|
|
|
--muted-border: #{mix($grey-800, $grey-900)};
|
2019-11-27 15:31:49 +07:00
|
|
|
|
|
|
|
// Card
|
2020-09-29 08:38:35 +07:00
|
|
|
--card-background: #{darken($grey-900, 2%)};
|
|
|
|
--card-sections: #{darken($grey-900, 4%)};
|
|
|
|
--card-shadow: 0 0.125rem 1rem #{rgba($black, 0.08)}, 0 0.125rem 2rem #{rgba($black, 0.04)}, 0 0 0 0.0625rem #{rgba($black, 0.1)};
|
2019-11-27 15:31:49 +07:00
|
|
|
|
|
|
|
// Code
|
2020-09-29 08:38:35 +07:00
|
|
|
--code-background: #{darken($grey-900, 4%)};
|
|
|
|
--code-inlined: #{rgba($grey-700, .25)};
|
|
|
|
--code-color-1: #{$grey-500};
|
|
|
|
--code-color-2: #{hsl(330, 30%, 50%)};
|
|
|
|
--code-color-3: #{hsl(185, 30%, 50%)};
|
|
|
|
--code-color-4: #{hsl(40, 10%, 50%)};
|
|
|
|
--code-color-5: #{mix($grey-600, $grey-700)};
|
2019-11-27 15:31:49 +07:00
|
|
|
|
|
|
|
// Table
|
2020-09-29 08:38:35 +07:00
|
|
|
--table-border: #{rgba($grey-500, .075)};
|
|
|
|
--table-stripping: #{rgba($grey-500, .05)};
|
2019-11-27 15:31:49 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-02 11:52:26 +07:00
|
|
|
// Dark theme (Forced)
|
|
|
|
// Enabled if forced with data-theme="dark"
|
2019-11-27 15:31:49 +07:00
|
|
|
[data-theme="dark"] {
|
|
|
|
|
|
|
|
// Document
|
2020-09-29 08:38:35 +07:00
|
|
|
--background: #{darken($grey-900, 6%)};
|
2019-11-27 15:31:49 +07:00
|
|
|
|
|
|
|
// Typography
|
2020-09-29 08:38:35 +07:00
|
|
|
--text: #{$grey-300};
|
|
|
|
--h1: #{$grey-50};
|
|
|
|
--h2: #{$grey-100};
|
|
|
|
--h3: #{$grey-200};
|
|
|
|
--h4: #{$grey-300};
|
|
|
|
--h5: #{$grey-400};
|
|
|
|
--h6: #{$grey-500};
|
2019-11-27 15:31:49 +07:00
|
|
|
|
2019-11-30 12:43:20 +07:00
|
|
|
// Primary Call-to-Action and links
|
2020-09-29 08:38:35 +07:00
|
|
|
--primary: #{$primary-600};
|
2020-09-29 14:54:27 +07:00
|
|
|
--primary-border: var(--primary);
|
2020-09-29 08:38:35 +07:00
|
|
|
--primary-hover: #{$primary-500};
|
2020-09-29 14:54:27 +07:00
|
|
|
--primary-hover-border: var(--primary-hover);
|
2020-09-29 08:38:35 +07:00
|
|
|
--primary-focus: #{rgba($primary-600, .25)};
|
|
|
|
--primary-inverse: #{$white};
|
|
|
|
|
2020-10-09 12:03:52 +07:00
|
|
|
// Secondary Call-to-Action, links and kbd
|
2020-09-29 08:38:35 +07:00
|
|
|
--secondary: #{$grey-600};
|
2020-09-29 14:54:27 +07:00
|
|
|
--secondary-border: var(--secondary);
|
2020-09-29 08:38:35 +07:00
|
|
|
--secondary-hover: #{$grey-500};
|
2020-09-29 14:54:27 +07:00
|
|
|
--secondary-hover-border: var(--secondary-hover);
|
2020-09-29 08:38:35 +07:00
|
|
|
--secondary-focus: #{rgba($grey-600, .25)};
|
|
|
|
--secondary-inverse: #{$white};
|
2019-12-02 11:52:26 +07:00
|
|
|
|
|
|
|
// Contrast Call-to-Action and Tooltips
|
2020-09-29 08:38:35 +07:00
|
|
|
--contrast: #{$grey-100};
|
2020-09-29 14:54:27 +07:00
|
|
|
--contrast-border: var(--contrast);
|
2020-09-29 08:38:35 +07:00
|
|
|
--contrast-hover: #{$white};
|
2020-09-29 14:54:27 +07:00
|
|
|
--contrast-hover-border: var(--contrast-hover);
|
2020-09-29 08:38:35 +07:00
|
|
|
--contrast-focus: #{rgba($grey-600, .25)};
|
|
|
|
--contrast-inverse: #{darken($grey-900, 6%)};
|
2019-11-27 15:31:49 +07:00
|
|
|
|
|
|
|
// Form elements
|
2020-09-29 08:38:35 +07:00
|
|
|
--input-background: #{darken($grey-900, 6%)};
|
|
|
|
--input-border: #{mix($grey-800, $grey-700)};
|
2020-09-29 14:54:27 +07:00
|
|
|
--input-hover-background: var(--input-background);
|
|
|
|
--input-hover-border: var(--primary);
|
2020-09-29 10:53:42 +07:00
|
|
|
--input-focus: var(--primary-focus);
|
|
|
|
--input-inverse: var(--primary-inverse);
|
2020-09-29 08:38:35 +07:00
|
|
|
|
|
|
|
// Button
|
|
|
|
--button-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
|
|
|
|
--button-hover-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
|
2019-11-27 15:31:49 +07:00
|
|
|
|
|
|
|
// Utilities states
|
2020-09-29 08:38:35 +07:00
|
|
|
--valid: #{$green-700};
|
|
|
|
--invalid: #{$red-900};
|
2020-09-30 17:20:28 +07:00
|
|
|
--mark: #{rgba($amber-200, .1875)};
|
2020-09-29 08:38:35 +07:00
|
|
|
--mark-text: #{$white};
|
|
|
|
--muted-text: #{$grey-500};
|
|
|
|
--muted-background: #{mix($grey-800, $grey-900)};
|
|
|
|
--muted-border: #{mix($grey-800, $grey-900)};
|
2019-11-27 15:31:49 +07:00
|
|
|
|
|
|
|
// Card
|
2020-09-29 08:38:35 +07:00
|
|
|
--card-background: #{darken($grey-900, 2%)};
|
|
|
|
--card-sections: #{darken($grey-900, 4%)};
|
|
|
|
--card-shadow: 0 0.125rem 1rem #{rgba($black, 0.08)}, 0 0.125rem 2rem #{rgba($black, 0.04)}, 0 0 0 0.0625rem #{rgba($black, 0.1)};
|
2019-11-27 15:31:49 +07:00
|
|
|
|
|
|
|
// Code
|
2020-09-29 08:38:35 +07:00
|
|
|
--code-background: #{darken($grey-900, 4%)};
|
|
|
|
--code-inlined: #{rgba($grey-700, .25)};
|
|
|
|
--code-color-1: #{$grey-500};
|
|
|
|
--code-color-2: #{hsl(330, 30%, 50%)};
|
|
|
|
--code-color-3: #{hsl(185, 30%, 50%)};
|
|
|
|
--code-color-4: #{hsl(40, 10%, 50%)};
|
|
|
|
--code-color-5: #{mix($grey-600, $grey-700)};
|
2019-11-27 15:31:49 +07:00
|
|
|
|
|
|
|
// Table
|
2020-09-29 08:38:35 +07:00
|
|
|
--table-border: #{rgba($grey-500, .075)};
|
|
|
|
--table-stripping: #{rgba($grey-500, .05)};
|
2019-11-27 15:31:49 +07:00
|
|
|
}
|