slonksite/style.css

245 lines
3.8 KiB
CSS

/* colors */
:root {
--base: #1e1e2e;
--text: #cdd6f4;
--crust: #11111b;
--surface0: #313244;
--subtext0: #a6adc8;
--subtext1: #bac2de;
--pink: #f5c2e7;
--rosewater: #f5e0dc;
--blue: #89b4fa;
--mauve: #cba6f7;
color-scheme: dark;
}
@media (prefers-color-scheme: light) {
:root {
--base: #eff1f5;
--text: #4c4f69;
--crust: #dce0e8;
--surface0: #ccd0da;
--subtext0: #6c6f85;
--subtext1: #5c5f77;
--pink: #ea76cb;
--rosewater: #dc8a78;
--blue: #1e66f5;
--mauve: #8839ef;
color-scheme: light;
}
}
:root,
code {
font-family: "Hack", "Hack Nerd Font", "JetBrains Mono", "JetBrainsMono Nerd Font", monospace,
sans-serif;
}
:root {
scrollbar-width: none;
background-color: var(--base);
color: var(--text);
accent-color: var(--pink);
}
body {
margin: 0;
padding: 0;
background-color: var(--base);
}
main {
padding: 1em;
background-color: var(--base);
}
body > main > h1:first-child {
margin-top: 0;
}
a {
color: var(--pink);
}
a:hover {
color: var(--rosewater);
}
a:active {
color: var(--blue);
}
a:visited {
color: var(--mauve);
}
progress {
width: 100%;
border: 2px solid;
background-color: var(--base);
color: var(--pink);
accent-color: var(--pink);
border-color: var(--text);
}
::-moz-progress-bar,
::-webkit-progress-value {
background-color: var(--pink) !important;
}
::-webkit-progress-bar {
background-color: var(--base);
width: 100%;
}
fieldset {
margin-bottom: 1em;
border-color: var(--text);
}
footer {
text-align: end;
font-size: small;
opacity: 50%;
}
code {
padding: 0.15em 0.3em;
overflow-wrap: break-word;
word-break: break-all;
white-space: pre-wrap;
background-color: var(--surface0);
color: var(--subtext1);
}
pre > code {
border: 2px solid var(--surface0);
padding: 1.25em 1.5em;
display: block;
background-color: var(--base);
color: var(--text);
}
legend {
font-weight: 900;
}
.projects-list li details[open] {
margin: 1em auto;
}
summary:hover,
summary:active,
details[open] > summary {
font-weight: bold;
}
summary::after {
content: " (click to expand)";
opacity: 50%;
font-size: smaller;
font-weight: lighter;
}
details[open] > summary::after {
content: " (click to collapse)";
}
div.buttons a {
font-size: 0;
}
div.buttons a > img {
image-rendering: crisp-edges;
image-rendering: pixelated;
object-fit: contain;
width: 88px;
height: 31px;
}
table {
word-break: break-word;
}
td:first-child {
font-weight: bold;
word-break: keep-all;
vertical-align: top;
}
td:nth-child(2) {
padding-left: 1em;
word-break: break-all;
}
.webring a {
text-decoration: none;
}
blockquote {
margin-left: 1em;
padding-left: 1.5em;
border-left: 0.5em solid;
border-color: var(--rosewater);
}
@media (min-width: 956px) {
:root {
--target-ratio: 0.7; /* 669px - 1344x */
--width: min(100% * var(--target-ratio), 1920px * var(--target-ratio));
--padding: 4em;
--padded-width: calc(var(--width) - var(--padding) * 2);
}
body {
padding: 4em 0;
min-height: calc(100vh - 8em);
background: var(--crust);
background: linear-gradient(
90deg,
var(--base) 0%,
var(--crust) calc((100% - var(--width)) / 2),
var(--crust) calc(50% + var(--width) / 2),
var(--base) 100%
);
}
body > * {
margin: auto;
padding: var(--padding);
width: var(--padded-width);
}
body > footer {
padding: initial;
width: var(--width);
}
}
/* WARNING: freaky mode */
:root:has(#freaky:checked)::after {
content: "";
z-index: 1000;
position: fixed;
top: 0;
left: 0;
margin: 0;
width: 100vw;
height: 100vh;
background: rgb(154, 65, 40);
background: linear-gradient(
215deg,
rgba(154, 65, 40, 1) 0%,
rgba(116, 36, 94, 1) 50%,
rgba(59, 56, 132, 1) 100%
);
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100% 100%;
opacity: 0.6;
pointer-events: none;
}