pico/scss/themes/default/_schemes.scss

40 lines
864 B
SCSS
Raw Normal View History

2022-10-23 10:47:50 +07:00
@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) {
2022-12-29 17:51:38 +07:00
:root:not([data-theme]) {
2022-10-23 10:47:50 +07:00
@include dark.theme;
}
}
// Dark color scheme (Forced)
// Enabled if forced with data-theme="dark"
[data-theme="dark"] {
@include dark.theme;
}
2024-01-25 01:42:54 +07:00
#{$parent-selector} progress,
#{$parent-selector} [type="checkbox"],
#{$parent-selector} [type="radio"],
#{$parent-selector} [type="range"] {
2023-12-28 13:21:52 +07:00
accent-color: var(#{$css-var-prefix}primary);
2022-10-23 10:47:50 +07:00
}
}