277 lines
4.7 KiB
CSS
277 lines
4.7 KiB
CSS
:root {
|
|
--sans-font: "Ubuntu Nerd Font", Arial, Helvetica, "Helvetica Neue", sans-serif;
|
|
--mono-font: "UbuntuMono Nerd Font", monospace;
|
|
--standard-border-radius: .8rem;
|
|
|
|
/* Light theme */
|
|
--bg: #d1dbe4;
|
|
--accent-bg: #a3b7ca;
|
|
--text: #212121;
|
|
--text-light: #7593af;
|
|
--border: #ededf0;
|
|
--code: #194a7a;
|
|
--preformatted: #476f95;
|
|
--marked: #7593af;
|
|
--accent: #194a7a;
|
|
--accent-hover: #476f95;
|
|
--accent-text: var(--bg);
|
|
--accent-disabled: ##a3b7ca;
|
|
}
|
|
|
|
/* Dark theme */
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
color-scheme: dark;
|
|
--bg: #1E293B;
|
|
--text: #d0d4fc;
|
|
--text-light: #A9AED2;
|
|
--link-text: #83C3F3;
|
|
--link-text-hover: #DBEAFE;
|
|
--border: #d0d4fc;
|
|
--border-light: #475569;
|
|
--code: #A5B4FC;
|
|
--preformatted: #0F172A;
|
|
--accent: #60A5FA;
|
|
--accent-bg: #293548;
|
|
--accent-hover: #5FA5FA7f;
|
|
--accent-text: var(--bg);
|
|
--accent-disabled: #476f95;
|
|
--table-border: #263449;
|
|
--table-alternate: #222F42;
|
|
}
|
|
|
|
/* Add a bit of transparency so light media isn't so glaring in dark mode */
|
|
img,
|
|
video {
|
|
opacity: 0.8;
|
|
}
|
|
}
|
|
|
|
body {
|
|
font-size: 1rem;
|
|
grid-template-columns: 1fr min(55rem, 90%) 1fr;
|
|
}
|
|
|
|
a,
|
|
a:visited {
|
|
color: var(--link-text);
|
|
text-decoration: none;
|
|
}
|
|
|
|
a:hover {
|
|
color: var(--link-text-hover);
|
|
}
|
|
|
|
.button[aria-disabled="true"],
|
|
input:disabled,
|
|
textarea:disabled,
|
|
select:disabled,
|
|
button[disabled] {
|
|
cursor: not-allowed;
|
|
background-color: var(--accent-disabled);
|
|
border-color: var(--accent-disabled);
|
|
color: var(--text-light);
|
|
}
|
|
|
|
header > h1 {
|
|
color: var(--accent);
|
|
}
|
|
|
|
h1 {
|
|
font-size: 3rem;
|
|
font-weight: lighter;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 2.6rem;
|
|
margin-top: 3rem;
|
|
font-weight: lighter;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 2rem;
|
|
margin-top: 3rem;
|
|
font-weight: lighter;
|
|
}
|
|
|
|
h4 {
|
|
font-size: 1.44rem;
|
|
font-weight: lighter;
|
|
}
|
|
|
|
h5 {
|
|
font-size: 1.15rem;
|
|
font-weight: lighter;
|
|
}
|
|
|
|
h6 {
|
|
font-size: 0.96rem;
|
|
font-weight: lighter;
|
|
}
|
|
|
|
@media only screen and (max-width: 720px) {
|
|
h1 {
|
|
font-size: 2.5rem;
|
|
font-weight: lighter;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 2.1rem;
|
|
font-weight: lighter;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 1.75rem;
|
|
font-weight: lighter;
|
|
}
|
|
|
|
h4 {
|
|
font-size: 1.25rem;
|
|
font-weight: lighter;
|
|
}
|
|
}
|
|
|
|
|
|
/* Tables */
|
|
td,
|
|
th {
|
|
padding: 0.5rem;
|
|
padding: 1rem 1.5rem;
|
|
border-style: solid;
|
|
border-color: var(--table-border);
|
|
}
|
|
|
|
tr:first-child > td:first-child {
|
|
border-top-left-radius: var(--standard-border-radius);
|
|
}
|
|
|
|
tr:first-child > td:last-child {
|
|
border-top-right-radius: var(--standard-border-radius);
|
|
}
|
|
|
|
tr:last-child > td:first-child {
|
|
border-bottom-left-radius: var(--standard-border-radius);
|
|
}
|
|
|
|
tr:last-child > td:last-child {
|
|
border-bottom-right-radius: var(--standard-border-radius);
|
|
}
|
|
|
|
tr > td:last-child {
|
|
border-right-width: .15rem;
|
|
}
|
|
|
|
tr:first-child > td {
|
|
border-top-width: .15rem;
|
|
}
|
|
|
|
tr > td:first-child {
|
|
border-left-width: .15rem;
|
|
}
|
|
|
|
tr:last-child > td {
|
|
border-bottom-width: .15rem;
|
|
}
|
|
|
|
table {
|
|
border-collapse: separate;
|
|
border-spacing: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
th {
|
|
background-color: var(--bg);
|
|
text-transform: uppercase;
|
|
font-weight: bold;
|
|
font-size: small;
|
|
border: none
|
|
}
|
|
|
|
tr:nth-child(even) td {
|
|
/* Set every other cell slightly darker. Improves readability. */
|
|
background-color: var(--table-alternate);
|
|
}
|
|
|
|
tr:nth-child(even) {
|
|
/* Set every other cell slightly darker. Improves readability. */
|
|
background-color: var(--bg);
|
|
}
|
|
|
|
table caption {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
pre {
|
|
color: var(--text);
|
|
padding: 1rem 1.4rem;
|
|
max-width: 100%;
|
|
overflow: auto;
|
|
background-color: var(--preformatted);
|
|
border: none
|
|
}
|
|
|
|
/* The line numbers already provide some kind of left/right padding */
|
|
pre[data-linenos] {
|
|
padding: 1rem 0;
|
|
}
|
|
pre table td {
|
|
padding: 0;
|
|
}
|
|
/* The line number cells */
|
|
pre table td:nth-of-type(1) {
|
|
text-align: center;
|
|
vertical-align: top;
|
|
user-select: none;
|
|
}
|
|
|
|
samp,
|
|
code {
|
|
background-color: var(--preformatted);
|
|
border-radius: .25rem;
|
|
border-width: 1px;
|
|
border-color: var(--border-light);
|
|
font-size: .85rem;
|
|
font-weight: 500;
|
|
line-height: 1rem;
|
|
padding: .25rem;
|
|
}
|
|
|
|
pre code {
|
|
border-style: none
|
|
}
|
|
|
|
|
|
ul > li::marker, ol > li::marker {
|
|
color: var(--accent);
|
|
}
|
|
|
|
ul {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
li:has(input) {
|
|
list-style-type: none;
|
|
}
|
|
|
|
kbd {
|
|
color: var(--text);
|
|
background-color: var(--preformatted);
|
|
border-color: var(--border);
|
|
border-style: solid;
|
|
border-width: .1rem;
|
|
}
|
|
|
|
blockquote {
|
|
margin-inline-start: 2rem;
|
|
margin-inline-end: 2rem;
|
|
margin-block: 2rem;
|
|
padding: 0.4rem 0.8rem;
|
|
color: var(--text-light);
|
|
background-color: var(--accent-bg);
|
|
border-inline-start: none;
|
|
border-color: var(--border);
|
|
border-radius: var(--standard-border-radius);
|
|
border-style: dashed;
|
|
border-width: .1rem;
|
|
font-style: italic;
|
|
}
|