generated from dvcol/svelte-lib-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
90 additions
and
48 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
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,45 +1,71 @@ | ||
:root, | ||
:host { | ||
/** source colors */ | ||
--white-source: 255 255 255; | ||
--white-soft-source: 230 231 238; | ||
--grey-source: 200 208 231; | ||
--black-source: 0 0 0; | ||
--black-soft-source: 68 71 106; | ||
--black-strong-source: 49 52 75; | ||
--purple-source: 46 0 255; | ||
|
||
/* ui color variables */ | ||
--white: rgb(var(--white-source)); | ||
--white-soft: rgb(var(--white-soft-source)); | ||
--grey: rgb(var(--grey-source)); | ||
--grey-50: rgba(var(--grey-source) / 50%); | ||
--grey-70: rgba(var(--grey-source) / 70%); | ||
--black: rgb(var(--black-source)); | ||
--black-soft: rgb(var(--black-soft-source)); | ||
--black-strong: rgb(var(--black-strong-source)); | ||
--purple: rgb(var(--purple-source)); | ||
--purple-50: rgba(var(--purple-source) / 50%); | ||
--purple-90: rgba(var(--purple-source) / 90%); | ||
--white: oklch(100% 0 89.876deg); | ||
--white-10: oklch(from var(--white) l c h / 10%); | ||
--white-80: oklch(from var(--white) l c h / 80%); | ||
--white-soft: oklch(92.9% 0.009 279.682deg); | ||
--black: oklch(0% 0 0deg); | ||
--black-soft-light: oklch(from var(--black-soft) calc(l + 0.075) c h); | ||
--black-soft: oklch(24.7% 0.008 264.416deg); | ||
--black-soft-strong: oklch(from var(--black-soft) calc(l - 0.075) c h); | ||
--grey: oklch(85.9% 0.033 270.413deg); | ||
--grey-50: oklch(from var(--grey) l c h / 50%); | ||
--grey-soft: oklch(from var(--grey) calc(l - 0.4) c h); | ||
--grey-soft-20: oklch(from var(--grey-soft) l c h / 20%); | ||
--purple: oklch(46.4% 0.305 269.594deg); | ||
--purple-50: oklch(from var(--purple) l c h / 50%); | ||
--purple-80: oklch(from var(--purple) l c h / 80%); | ||
--purple-soft: oklch(from var(--purple) calc(l + 0.4) c h); | ||
--purple-soft-50: oklch(from var(--purple-soft) l c h / 50%); | ||
--purple-soft-80: oklch(from var(--purple-soft) l c h / 80%); | ||
|
||
/** semantic colors */ | ||
--text-color: var(--black-soft); | ||
--text-color-focused: var(--purple); | ||
--text-color-hover: var(--purple-90); | ||
--text-color-disabled: var(--grey); | ||
--border-color: var(--grey-50); | ||
--text-color: var(--grey-soft); | ||
--text-color-focused: var(--purple-80); | ||
--text-color-hover: var(--purple); | ||
--text-color-disabled: var(--text-color); | ||
--border-color: var(--grey-soft-20); | ||
--border-color-focused: var(--purple-50); | ||
--border-color-hover: var(--purple-90); | ||
--border-color-disabled: var(--grey-70); | ||
--border-color-hover: var(--purple-80); | ||
--border-color-disabled: var(--border-color); | ||
--background-color: var(--white-soft); | ||
--shadow-color-light: var(--white); | ||
--shadow-color-dark: var(--grey); | ||
|
||
/** dark mode semantic colors */ | ||
--dark-text-color: var(--white-80); | ||
--dark-text-color-focused: var(--purple-soft-80); | ||
--dark-text-color-hover: var(--purple-soft); | ||
--dark-text-color-disabled: var(--white-soft-50); | ||
--dark-border-color: var(--white-10); | ||
--dark-border-color-focused: var(--purple-soft-50); | ||
--dark-border-color-hover: var(--purple-soft-80); | ||
--dark-border-color-disabled: var(--dark-border-color); | ||
--dark-background-color: var(--black-soft); | ||
--dark-shadow-color-light: var(--black-soft-light); | ||
--dark-shadow-color-dark: var(--black-soft-strong); | ||
|
||
/* touch highlight */ | ||
-webkit-tap-highlight-color: transparent; | ||
|
||
/* cursor highlight */ | ||
*::selection { | ||
background-color: var(--grey); | ||
} | ||
|
||
/* override semantic color if dark mode is enabled */ | ||
@media (prefers-color-scheme: dark) { | ||
--text-color: var(--dark-text-color); | ||
--text-color-focused: var(--dark-text-color-focused); | ||
--text-color-hover: var(--dark-text-color-hover); | ||
--text-color-disabled: var(--dark-text-color-disabled); | ||
--border-color: var(--dark-border-color); | ||
--border-color-focused: var(--dark-border-color-focused); | ||
--border-color-hover: var(--dark-border-color-hover); | ||
--border-color-disabled: var(--dark-border-color-disabled); | ||
--background-color: var(--dark-background-color); | ||
--shadow-color-light: var(--dark-shadow-color-light); | ||
--shadow-color-dark: var(--dark-shadow-color-dark); | ||
} | ||
} |
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