new rgb guide & small homepage restructure #9

Open
lilly wants to merge 10 commits from new-rgb-guide into main
Showing only changes of commit 0c8b0737c1 - Show all commits

split css style into layers for explicit per-site styling

lilly 2025-12-12 12:25:48 +01:00
Signed by: lilly
SSH key fingerprint: SHA256:y9T5GFw2A20WVklhetIxG1+kcg/Ce0shnQmbu1LQ37g

View file

@ -1,62 +1,70 @@
:root { @layer base, per-site;
@layer base {
:root {
/* Use a shade of the c3cat logos pink, which works nicely as a link color. */ /* Use a shade of the c3cat logos pink, which works nicely as a link color. */
--accent-color-light: #DC049B; --accent-color-light: #DC049B;
/* A modified version of accent-color-light, which works nicely as a link color /* A modified version of accent-color-light, which works nicely as a link color
* and with the dark theme */ * and with the dark theme */
--accent-color-dark: #dc49b0; --accent-color-dark: #dc49b0;
} }
body { body {
font-family: system-ui,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,Helvetica,Arial,"Helvetica Neue",sans-serif; font-family: system-ui,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,Helvetica,Arial,"Helvetica Neue",sans-serif;
text-align: left; text-align: left;
/* Use dark grey instead of black to be lighter on the eyes. But also a grey /* Use dark grey instead of black to be lighter on the eyes. But also a grey
* which still works with the link color nicely. */ * which still works with the link color nicely. */
background-color: #ffffff; --bg-color: #ffffff;
color: #2B2B2B; --fg-color: #2b2b2b;
--accent-color: var(--accent-color-light);
background-color: var(--bg-color);
color: var(--fg-color);
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
/* Colors for dark theme, which have enough contrast, but also aren't too harsh on the eyes. */ /* Colors for dark theme, which have enough contrast, but also aren't too harsh on the eyes. */
/* See: https://seirdy.one/posts/2020/11/23/website-best-practices/#dark-themes */ /* See: https://seirdy.one/posts/2020/11/23/website-best-practices/#dark-themes */
background-color: #1b1b1b; --bg-color: #1b1b1b;
color: #ebebeb; --fg-color: #ebebeb;
--accent-color: var(--accent-color-dark);
}
} }
}
.container { .container {
max-width: 600px; max-width: 600px;
margin: 0 auto; margin: 0 auto;
padding: 0 5px; padding: 0 5px;
}
footer {
margin-top: 4rem;
}
img {
width: 100%;
}
a:link, a:visited {
color: var(--accent-color-light);
@media (prefers-color-scheme: dark) {
color: var(--accent-color-dark);
} }
}
footer {
margin-top: 4rem;
}
.title { img {
width: 100%;
}
a:link, a:visited {
color: var(--accent-color);
}
u {
text-decoration-color: var(--accent-color);
}
.title {
text-align: center; text-align: center;
} }
.hero-img { .hero-img {
max-width: 500px; max-width: 500px;
display: block; display: block;
margin: 0 auto; margin: 0 auto;
} }
p.bigger { p.bigger {
font-size: 1.2rem; font-size: 1.2rem;
}
} }