Files
rglkart/css/main.css
T

152 lines
3.0 KiB
CSS
Raw Normal View History

2026-10-04 20:30:22 -07:00
@font-face {
font-family: "Elegant Typewriter";
src:
url("/fonts/elegant_typewriter/ELEGANT TYPEWRITER Regular.ttf");
}
2026-10-04 18:32:35 +02:00
:root {
color-scheme: light dark;
2026-10-04 20:30:22 -07:00
--color-light: #f5ecdf;
--color-dark: #11192c;
--color-nav-light: #e7d7bc;
--color-nav-dark: #2a244d;
--color-title-bg: #bc5b56;
--color-title-text: #09183b;
--color-bg: light-dark(var(--color-light), var(--color-dark));
--color-text: light-dark(var(--color-dark), var(--color-light));
--color-headers: light-dark(var(--color-nav-dark), var(--color-nav-light));
--font-headers: "Elegant Typewriter", serif;
--font-body: "Atkinson Hyperlegible Next", sans-serif;
2026-10-04 18:32:35 +02:00
}
/* numbered components are from https://www.joshwcomeau.com/css/custom-css-reset/ */
#root, #__next {
isolation: isolate; /* 10. Create a root stacking context */
}
*, *::before, *::after {
box-sizing: border-box; /* 1. Use a more-intuitive box-sizing model */
}
*:not(dialog) {
margin: 0; /* 2. Remove default margin */
2026-10-04 20:30:22 -07:00
padding: 0;
}
html {
height: 100%;
2026-10-04 18:32:35 +02:00
}
@media (prefers-reduced-motion: no-preference) {
html {
interpolate-size: allow-keywords; /* 3. Enable keyword animations */
}
}
body {
2026-10-04 20:30:22 -07:00
height: 100%;
min-height: 100%;
display: grid;
grid-template-rows: auto 1fr auto;
2026-10-04 18:32:35 +02:00
line-height: 1.5; /* 4. Increase line-height */
-webkit-font-smoothing: antialiased; /* 5. Improve text rendering */
2026-10-04 20:30:22 -07:00
color: var(--color-text);
background: var(--color-bg);
font-family: var(--font-body);
}
#content {
width: 65%;
max-width: 1800px;
margin: 1rem auto;
}
@media (max-width: 1100px) {
#content {
width: 85%;
}
}
@media (max-width: 650px) {
#content {
width: 92%;
}
2026-10-04 18:32:35 +02:00
}
img, picture, video, canvas, svg {
display: block; /* 6. Improve media defaults */
max-width: 100%; /* 6. Improve media defaults */
height: auto; /* 6. Improve media defaults */
}
input, button, textarea, select {
font: inherit; /* 7. Inherit fonts for form controls */
}
h1, h2, h3, h4, h5, h6, p {
overflow-wrap: break-word; /* 8. Avoid text overflows */
}
h1, h2, h3, h4, h5, h6 {
text-wrap: balance; /* 9. Improve line wrapping */
2026-10-04 20:30:22 -07:00
font-family: var(--font-headers);
}
h1 {
color: var(--color-title-text);
background: var(--color-title-bg);
font-size: 3rem;
text-align: center;
padding-block: .4em;
}
h2, h3, h4, h5, h6 {
color: var(--color-headers);
}
h2 {
font-size: 2rem;
}
@media (max-width: 800px) {
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
2026-10-04 18:32:35 +02:00
}
p {
text-wrap: pretty; /* 9. Improve line wrapping */
2026-10-04 20:30:22 -07:00
margin-block: 1.3rem;
line-height: 1.7em;
}
@media (max-width: 650px) {
p { font-size: .9rem; }
}
a {
color: var(--color-text);
2026-10-04 21:10:20 -07:00
border-radius: .25em;
2026-10-04 20:30:22 -07:00
text-decoration-line: underline;
text-decoration-style: solid;
text-decoration-thickness: .2em;
text-decoration-color: var(--color-title-bg);
transition: text-decoration-thickness .5s;
}
@media (any-hover: hover) {
a:hover {
text-decoration-thickness: .4em;
}
}
2026-10-04 21:10:20 -07:00
a:focus-visible {
outline: .1em solid var(--color-title-bg);
text-decoration: none;
}
2026-10-04 20:30:22 -07:00
a:active {
text-decoration-thickness: .4em;
2026-10-04 18:32:35 +02:00
}