2023-06-18 18:07:54 +04:00
|
|
|
.theme-mixin(@accent: #6570d6, @bdrs: 2rem, @purebg: false) {
|
2023-05-05 14:01:09 +04:00
|
|
|
|
2023-06-18 18:07:54 +04:00
|
|
|
@bg-pure-light: #fff;
|
|
|
|
@bg-colored-light: hsl(
|
|
|
|
hue(@accent),
|
|
|
|
15%, 95%,
|
|
|
|
);
|
2023-05-05 14:01:09 +04:00
|
|
|
|
2023-06-18 18:07:54 +04:00
|
|
|
@bg-light: if(@purebg, @bg-pure-light, @bg-colored-light); // background
|
|
|
|
@fg-light: #202020; // foreground
|
|
|
|
|
|
|
|
@bg-pure-dark: #222;
|
|
|
|
@bg-colored-dark: hsl(
|
|
|
|
hue(@accent),
|
|
|
|
5%, 15%,
|
|
|
|
);
|
|
|
|
|
|
|
|
@bg-dark: if(@purebg, @bg-pure-dark, @bg-colored-dark); // background
|
|
|
|
@fg-dark: #eee; // foreground
|
2023-05-05 14:01:09 +04:00
|
|
|
|
|
|
|
--accent: @accent;
|
2023-06-18 18:07:54 +04:00
|
|
|
--bdrs: @bdrs;
|
2023-05-05 14:01:09 +04:00
|
|
|
|
|
|
|
.light-mixin() {
|
|
|
|
--bg: @bg-light;
|
|
|
|
--fg: @fg-light;
|
2023-06-18 18:07:54 +04:00
|
|
|
|
2023-05-05 14:01:09 +04:00
|
|
|
--bg-sec: darken(@bg-light, 30%);
|
2023-06-18 18:07:54 +04:00
|
|
|
--fg-sec: lighten(@fg-light, 25%);
|
|
|
|
|
|
|
|
@accent-fg: darken(@accent, 7%);
|
|
|
|
--accent-bg: darken(@bg-light, 8%);
|
|
|
|
--accent-fg: @accent-fg;
|
|
|
|
--accent-hl: darken(@accent-fg, 15%);
|
2023-05-05 14:01:09 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
.dark-mixin() {
|
|
|
|
--bg: @bg-dark;
|
|
|
|
--fg: @fg-dark;
|
2023-06-18 18:07:54 +04:00
|
|
|
|
2023-05-05 14:01:09 +04:00
|
|
|
--bg-sec: lighten(@bg-dark, 15%);
|
2023-06-18 18:07:54 +04:00
|
|
|
--fg-sec: darken(@fg-dark, 30%);
|
|
|
|
|
|
|
|
@accent-fg: lighten(@accent, 7%);
|
2023-05-05 14:01:09 +04:00
|
|
|
--accent-bg: lighten(@bg-dark, 5%);
|
2023-06-18 18:07:54 +04:00
|
|
|
--accent-fg: @accent-fg;
|
|
|
|
--accent-hl: lighten(@accent-fg, 15%);
|
2023-05-05 14:01:09 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
.dark-mixin();
|
|
|
|
// &.dark {
|
|
|
|
&[data-dark="1"] {
|
|
|
|
.dark-mixin();
|
|
|
|
}
|
|
|
|
// &.light {
|
|
|
|
&[data-dark="0"] {
|
|
|
|
.light-mixin();
|
|
|
|
}
|
|
|
|
@media (prefers-color-scheme: light) {
|
|
|
|
.light-mixin();
|
|
|
|
}
|
|
|
|
}
|