95 lines
1.4 KiB
CSS

:root {
--clr-text: #ebdbb2;
--clr-brand: #fabd2f;
--clr-bg-0: #282828;
--clr-bg-1: #1d2021;
color-scheme: dark;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
*:focus-visible {
outline: 2px solid var(--clr-brand);
}
::selection {
background-color: var(--clr-text);
color: var(--clr-bg-0);
}
body {
font-family: system-ui;
background-color: var(--clr-bg-0);
color: var(--clr-text);
padding: 1rem;
max-width: 1000px;
margin: 0 auto;
}
h1 {
font-size: 2.5rem;
}
h2 {
font-size: 2rem;
}
h3 {
font-size: 1rem;
}
h4 {
font-size: 0.5rem;
}
a {
font-weight: bold;
color: inherit;
text-decoration-color: var(--clr-brand);
}
p code {
background-color: #1d2021;
padding: 0.25rem 0.5rem;
border-radius: 0.5rem;
font-size: 1rem;
}
pre code {
border-radius: 0.5rem;
font-size: 1rem;
}
h1, h2, h3, h4, h5, h6 {
isolation: isolate;
position: relative;
max-width: max-content;
&::before {
content: "";
position: absolute;
top: -0.25em;
bottom: -0.25em;
right: -1em;
left: -10rem;
z-index: -1;
border-radius: 0.5rem;
background: linear-gradient(to left, var(--clr-bg-1) 75%, transparent);
}
}
h2 {
position: sticky;
top: 0;
z-index: 10;
}
table-of-contents > ul {
list-style: none;
padding-left: 0;
font-size: 1.25rem;
}