mirror of
https://github.com/kittywitch/dork.dev.git
synced 2026-02-09 15:19:18 -08:00
feat: a terrifying quantity of rework
This commit is contained in:
parent
65191fd93c
commit
35f5f48cc9
33 changed files with 250 additions and 161 deletions
77
sass/coloring.scss
Normal file
77
sass/coloring.scss
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
@use "sass:map";
|
||||
@use "headings";
|
||||
|
||||
// Let's not destroy people's eyes unless they want that
|
||||
$theme: dark !default;
|
||||
|
||||
$themes: (
|
||||
light: (
|
||||
bg: #fcfcfc,
|
||||
fg: #333,
|
||||
border: #333,
|
||||
code: #eee,
|
||||
heading: #111,
|
||||
a-link: #16b1bd,
|
||||
a-hover: #37DCE8,
|
||||
a-visited: #3784e8,
|
||||
),
|
||||
dark: (
|
||||
bg: #141414,
|
||||
fg: #ddd,
|
||||
border: #ddd,
|
||||
code: #282828,
|
||||
heading: #eee,
|
||||
a-link: #16b1bd,
|
||||
a-hover: #37DCE8,
|
||||
a-visited: #3784e8,
|
||||
)
|
||||
);
|
||||
|
||||
@function color($name, $theme: $theme) {
|
||||
@return map-get(
|
||||
map-get($themes, $theme),
|
||||
$name
|
||||
);
|
||||
}
|
||||
|
||||
@mixin link_state($name, $theme: $theme) {
|
||||
$color: color("a-#{$name}", $theme);
|
||||
@if $name == "link" {
|
||||
a, a:#{$name} {
|
||||
color: $color;
|
||||
}
|
||||
} else {
|
||||
a:#{$name} {
|
||||
color: $color;
|
||||
}
|
||||
}
|
||||
a:#{$name} {
|
||||
@include headings.headings {
|
||||
color: $color;
|
||||
@if $name == "hover" {
|
||||
border-bottom-color: $color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin set-colors($theme: $theme) {
|
||||
color: color(fg, $theme);
|
||||
background: color(bg, $theme);
|
||||
@include headings.headings {
|
||||
color: color(heading, $theme);
|
||||
}
|
||||
code {
|
||||
background: color(code, $theme);
|
||||
border-color: color(border, $theme);
|
||||
}
|
||||
$link_states: "link", "visited", "hover";
|
||||
@each $name in $link_states {
|
||||
@include link_state($name, $theme);
|
||||
}
|
||||
|
||||
a:hover:has(img) img {
|
||||
border-color: color(a-hover, $theme);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue