CSS variables for coloring

This commit is contained in:
rhpidfyre 2024-12-11 20:28:36 -05:00 committed by Quaternions
parent 0eaf9aa164
commit d37cc9cdf2
7 changed files with 48 additions and 20 deletions

View File

@ -4,13 +4,13 @@
align-items: center; align-items: center;
width: 100vw; width: 100vw;
height: 60px; height: 60px;
background: rgb(59,64,70); background: var(--header-grad-left);
background: linear-gradient(180deg, #363b40 0%, #353a40 100%); background: linear-gradient(180deg, var(--header-grad-left) 0%, var(--header-grad-right) 100%);
button { button {
background-color: transparent; background-color: transparent;
border: 0; border: 0;
color: white; color: var(--header-button-left);
} }
.left { .left {
@ -28,10 +28,10 @@
button { button {
font-size: 1rem; font-size: 1rem;
color: rgb(180,180,180); color: var(--header-button-right);
&:hover { &:hover {
color: white color: var(--header-button-hover)
} }
} }
} }

View File

@ -1,5 +1,4 @@
$review-border-color: #c8c8c8; $review-border: 1px solid var(--review-border);
$review-border: 1px solid $review-border-color;
@mixin border-with-radius { @mixin border-with-radius {
border: $review-border { border: $review-border {
@ -8,13 +7,42 @@ $review-border: 1px solid $review-border-color;
} }
:root { :root {
color-scheme: light; color-scheme: light dark;
--page: white;
--header-grad-left: #363b40;
--header-grad-right: #353a40;
--header-button-left: white;
--header-button-right: #b4b4b4;
--header-button-hover: white;
--review-border: #c8c8c8;
--text-color: #1e1e1e;
--anchor-link-review: #008fd6;
--window-header: #f5f5f5;
--comment-highlighted: #ffffd7;
--comment-area: white;
@media (prefers-color-scheme: dark) {
--page: rgb(15,15,15);
--header-grad-left: #363b40;
--header-grad-right: #353a40;
--header-button-left: white;
--header-button-right: #b4b4b4;
--header-button-hover: white;
--review-border: rgb(50,50,50);
--text-color: rgb(230,230,230);
--anchor-link-review: #008fd6;
--window-header: rgb(10,10,10);
--comment-highlighted: #ffffd7;
--comment-area: rgb(20,20,20);
}
} }
body { body {
font-family: -apple-system, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla"; font-family: -apple-system, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla";
box-sizing: border-box; box-sizing: border-box;
margin: 0; margin: 0;
background-color: var(--page);
} }
button { button {

View File

@ -18,7 +18,7 @@
display: block; display: block;
width: 100%; width: 100%;
height: 1px; height: 1px;
background-color: globals.$review-border-color; background-color: var(--review-border);
} }
.by-creator { .by-creator {

View File

@ -5,6 +5,7 @@
resize: none; resize: none;
width: 100%; width: 100%;
height: 100px; height: 100px;
background-color: var(--comment-area)
} }
.leave-comment-window { .leave-comment-window {
@ -36,7 +37,7 @@
header { header {
display: flex; display: flex;
align-items: center; align-items: center;
background-color: #f5f5f5; background-color: var(--window-header);
border-bottom: globals.$review-border; border-bottom: globals.$review-border;
height: 45px; height: 45px;

View File

@ -16,7 +16,7 @@ $comments-size: 60px;
//BhopMaptest comment //BhopMaptest comment
&[data-highlighted="true"] { &[data-highlighted="true"] {
background-color: #ffffd7; background-color: var(--comment-highlighted);
} }
> img { > img {
border-radius: 50%; border-radius: 50%;

View File

@ -27,7 +27,7 @@
header { header {
display: flex; display: flex;
align-items: center; align-items: center;
background-color: #f5f5f5; background-color: var(--window-header);
border-bottom: globals.$review-border; border-bottom: globals.$review-border;
height: 45px; height: 45px;

View File

@ -8,10 +8,9 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
p, h1 { p, h1 {
color: #1e1e1e; color: var(--text-color);
} }
h1 { h1 {
font: { font: {
@ -21,7 +20,7 @@
margin: 0; margin: 0;
} }
a { a {
color: #008fd6; color: var(--anchor-link-review);
&:hover { &:hover {
text-decoration: underline; text-decoration: underline;