mirror of
https://github.com/picocss/pico.git
synced 2025-04-30 21:09:13 -04:00
refactor: modules and css vars
This commit is contained in:
parent
2e4d6c66ec
commit
ce2ed6826d
46 changed files with 3874 additions and 3534 deletions
39
scss/themes/default/_schemes.scss
Normal file
39
scss/themes/default/_schemes.scss
Normal file
|
@ -0,0 +1,39 @@
|
|||
@use "sass:map";
|
||||
@use "../../settings" as *;
|
||||
|
||||
@use "light";
|
||||
@use "dark";
|
||||
|
||||
@if map.get($modules, "themes/default") {
|
||||
/**
|
||||
* Color schemes
|
||||
*/
|
||||
|
||||
// Light color scheme (Default)
|
||||
// Can be forced with data-theme="light"
|
||||
[data-theme="light"],
|
||||
:root:not([data-theme="dark"]) {
|
||||
@include light.theme;
|
||||
}
|
||||
|
||||
// Dark color scheme (Auto)
|
||||
// Automatically enabled if user has Dark mode enabled
|
||||
@media only screen and (prefers-color-scheme: dark) {
|
||||
:root:not([data-theme="light"]) {
|
||||
@include dark.theme;
|
||||
}
|
||||
}
|
||||
|
||||
// Dark color scheme (Forced)
|
||||
// Enabled if forced with data-theme="dark"
|
||||
[data-theme="dark"] {
|
||||
@include dark.theme;
|
||||
}
|
||||
|
||||
progress,
|
||||
[type="checkbox"],
|
||||
[type="radio"],
|
||||
[type="range"] {
|
||||
accent-color: var(#{$✨}primary);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue