forked from picturepan2/spectre
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(variables/colors): use the
$disabled-color
Sass variable i…
…nstead of CSS variable in the `$theme-dark` `$theme-light`. Use the CSS variables instead of `darken()` `lighten()` functions.
- Loading branch information
1 parent
e0a1326
commit e29a8ed
Showing
11 changed files
with
92 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
@use 'core' as *; | ||
|
||
// Background colors. | ||
$bg-color: lighten($dark-color, 75%) !default; // --#{$var-prefix}-bg-color. | ||
$bg-color-dark: darken($bg-color, 3%) !default; // --#{$var-prefix}-bg-color-dark. | ||
$bg-color-light: $light-color !default; // --#{$var-prefix}-bg-color-light. | ||
$bg-color: ('dark-color', +75%) !default; // --#{$var-prefix}-bg-color. | ||
$bg-color-dark: ('bg-color', -3%) !default; // --#{$var-prefix}-bg-color-dark. | ||
$bg-color-light: 'light-color' !default; // --#{$var-prefix}-bg-color-light. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
@use 'core' as *; | ||
|
||
// Border colors. | ||
$border-color: lighten($dark-color, 65%) !default; // --#{$var-prefix}-border-color. | ||
$border-color-dark: darken($border-color, 10%) !default; // --#{$var-prefix}-border-color-dark. | ||
$border-color-light: lighten($border-color, 8%) !default; // --#{$var-prefix}-border-color-light. | ||
$border-color: ('dark-color', +65%) !default; // --#{$var-prefix}-border-color. | ||
$border-color-dark: ('border-color', -10%) !default; // --#{$var-prefix}-border-color-dark. | ||
$border-color-light: ('border-color', +8%) !default; // --#{$var-prefix}-border-color-light. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
@use 'core' as *; | ||
|
||
// Gray colors. | ||
$gray-color: lighten($dark-color, 55%) !default; // --#{$var-prefix}-gray-color. | ||
$gray-color-dark: darken($gray-color, 30%) !default; // --#{$var-prefix}-gray-color-dark. | ||
$gray-color-light: lighten($gray-color, 20%) !default; // --#{$var-prefix}-gray-color-light. | ||
$gray-color: ('dark-color', +55%) !default; // --#{$var-prefix}-gray-color. | ||
$gray-color-dark: ('gray-color', -30%) !default; // --#{$var-prefix}-gray-color-dark. | ||
$gray-color-light: ('gray-color', +20%) !default; // --#{$var-prefix}-gray-color-light. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
@use 'core' as *; | ||
|
||
// Link colors. | ||
$link-color: $primary-color !default; // --#{$var-prefix}-link-color. | ||
$link-color-dark: darken($link-color, 10%) !default; // --#{$var-prefix}-link-color-dark. | ||
$link-color-light: lighten($link-color, 10%) !default; // --#{$var-prefix}-link-color-light. | ||
$link-color: 'primary-color' !default; // --#{$var-prefix}-link-color. | ||
$link-color-dark: ('link-color', -10%) !default; // --#{$var-prefix}-link-color-dark. | ||
$link-color-light: ('link-color', +10%) !default; // --#{$var-prefix}-link-color-light. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
@use 'bg' as *; | ||
@use 'body' as *; | ||
@use 'border' as *; | ||
@use 'control' as *; | ||
@use 'core' as *; | ||
@use 'gray' as *; | ||
@use 'link' as *; | ||
@use 'other' as *; | ||
|
||
$theme-normal: ( | ||
// Theme color. | ||
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color | ||
'theme-color': $theme-color, | ||
|
||
// Core colors. | ||
'dark-color': $dark-color, | ||
'light-color': $light-color, | ||
|
||
// - Accent color. | ||
'accent-color': $accent-color, | ||
|
||
// - Primary colors. | ||
'primary-color': $primary-color, | ||
'primary-color-dark': $primary-color-dark, | ||
'primary-color-light': $primary-color-light, | ||
|
||
// - Secondary colors. | ||
'secondary-color': $secondary-color, | ||
'secondary-color-dark': $secondary-color-dark, | ||
'secondary-color-light': $secondary-color-light, | ||
|
||
// Gray colors. | ||
'gray-color': $gray-color, | ||
'gray-color-dark': $gray-color-dark, | ||
'gray-color-light': $gray-color-light, | ||
|
||
// Bg colors. | ||
'bg-color': $bg-color, | ||
'bg-color-dark': $bg-color-dark, | ||
'bg-color-light': $bg-color-light, | ||
|
||
// Border colors. | ||
'border-color': $border-color, | ||
'border-color-dark': $border-color-dark, | ||
'border-color-light': $border-color-light, | ||
|
||
// Link colors. | ||
'link-color': $link-color, | ||
'link-color-dark': $link-color-dark, | ||
'link-color-light': $link-color-light, | ||
|
||
// Body colors. | ||
'body-bg-color': $body-bg-color, | ||
'body-font-color': $body-font-color, | ||
|
||
// Control colors. | ||
'disabled-color': $disabled-color, | ||
'error-color': $error-color, | ||
'info-color': $info-color, | ||
'success-color': $success-color, | ||
'warning-color': $warning-color, | ||
|
||
// Other colors. | ||
'code-color': $code-color, | ||
'highlight-color': $highlight-color, | ||
) !default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
@forward 'theme-dark'; | ||
@forward 'theme-light'; | ||
@forward 'theme-normal'; |