pico/scss/themes/default/_schemes.scss
2022-12-29 17:51:38 +07:00

40 lines
773 B
SCSS

@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]) {
@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);
}
}