refactor: modules and css vars

This commit is contained in:
Lucas Larroche 2022-10-23 10:47:50 +07:00
parent 2e4d6c66ec
commit ce2ed6826d
46 changed files with 3874 additions and 3534 deletions

View file

@ -1,34 +1,5 @@
@use "../settings" as *;
@use "default/light";
@use "default/dark";
// Colors schemes
@use "default/schemes";
// Commons styles
// Styles
@use "default/styles";
// Light theme (Default)
// Can be forced with data-theme="light"
[data-theme="light"],
:root:not([data-theme="dark"]) {
@include light.theme;
}
// Dark theme (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 theme (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);
}