@use "sass:map";
@use "sass:string";
@use "../abstracts/functions" as *;
// Takes a single CSS property and theme key (see abstracts/_themes) and sets
// both body.light and body.dark selectors.
@mixin themed($property, $key) {
// hack to allow root (body) theming
$selectors: str-split("#{&}");
@each $theme, $map in $themes {
@each $selector in $selectors {
@at-root body.#{$theme} #{$selector} {
#{$property}: map.get($map, $key);
}
}
}
}
// ----------------
// Dark & Light Themes
$themes: (
light: (
background-inner: #ffffff,
background-outer: #fcfcfc,
text: #202020,
medium-dark: #515151,
medium: #5e5e5e,
medium-light: #757575,
light: #d2d2d2,
kinda-light: #e3e3e3,
super-light: #f4f4f4,
super-duper-light: #fbfbfb,
links: #0e6dc2,
),
dark: (
background-inner: #1e1e1e,
background-outer: #252525,
text: #f1f1f1,
medium-dark: #d7d7d7,
medium: #b1b1b1,
medium-light: #959595,
light: #646464,
kinda-light: #535353,
super-light: #272727,
super-duper-light: #1f1f1f,
links: #88c7ff,
),
);
// Icons (modified twemojis)
$icon-bulb-on: 'data:image/svg+xml;charset=utf-8,';
$icon-bulb-off: 'data:image/svg+xml;charset=utf-8,';