bavbavhaus.net/public_html/css/style.css

235 lines
2.9 KiB
CSS

/* variables */
:root {
--font-size: 12pt;
--line-height: 1.25;
--font-family: monospace;
/* font-derived column width */
--col-w: clamp(33.33vw, 80ch, 80vw);
/* colors */
--fg-c: #000000;
--bg-c: #e2e2e2;
--link-c: #856cff;
--visited-c: #ff1170;
--active-c: #fa3500;
}
@media (prefers-color-scheme: dark) {
:root {
--fg-c: #e2e2e2;
--bg-c: #000000;
}
}
/* reset */
* {
box-sizing: border-box;
margin: unset;
hyphens: auto;
scrollbar-width: thin;
scrollbar-color: var(--link-c) rgba(0,0,0,0);
}
::selection {
color: var(--bg-c);
background-color: var(--fg-c);
}
/* root */
:root {
color: var(--fg-c);
background-color: var(--bg-c);
font: var(--font-size)/var(--line-height) var(--font-family);
}
body {
margin: 0;
}
/* content sectioning */
address {
font-style: unset;
}
h1, h2, h3, h4, h5, h6 {
hyphens: none;
font-size: unset;
}
:is(h1, h2, h3, h4, h5, h6) * {
hyphens: none;
}
h1, h2 {
font-weight: bold;
}
h3, h4, h5, h6 {
font-weight: unset;
font-style: italic;
}
/* text content */
:is(h1, h2, h3, h4, h5, h6) {
margin-block-start: 2rlh;
margin-block-end: 1rlh;
}
:is(blockquote, div, dl, figure, hr, menu, ol, p, pre, table, ul) +
:is(blockquote, div, dl, figure, hr, menu, ol, p, pre, table, ul) {
margin-block-start: 1rlh;
}
blockquote {
margin-inline: 2ch;
}
dt {
font-style: italic;
}
dd {
padding-inline-start: 2ch;
}
figure {
margin-inline: 2ch;
}
ol, ul, menu {
padding-inline-start: 5ch;
}
:is(ol, ul, menu) :is(ol, ul, menu) {
margin-block: unset;
}
li :is(blockquote, div, dl, figure, hr, menu, ol, p, pre, ul) {
margin-block: unset;
}
ul>li::marker {
content: "- ";
}
hr {
color: unset;
border: unset;
text-align: center;
}
hr::after {
content: "---";
}
pre {
margin-inline: 2ch;
color: var(--link-c);
overflow-y: scroll;
}
/* inline text semantics */
a {
cursor: pointer;
text-decoration: underline;
}
a:link {
color: var(--link-c);
}
a:link:active {
color: var(--active-c);
}
a:visited {
color: var(--visited-c);
}
a:visited:active {
color: var(--active-c);
}
code {
color: var(--link-c);
}
/* image and multimedia */
img {
max-width: 100%;
}
/* table content */
table {
table-layout: fixed;
border-collapse: collapse;
}
th, td {
padding-inline: 1ch;
}
th {
border-bottom: thin solid;
vertical-align: bottom;
hyphens: none;
}
td {
vertical-align: top;
}
/* layout */
main {
height: 100vh;
display: grid;
grid-auto-flow: column;
grid-auto-columns: var(--col-w);
overflow-x: scroll;
}
main>* {
padding: 1rlh 1ch;
overflow-y: scroll;
}
/* article.post */
article.post>header,
article.post>nav {
margin-block: 1rlh;
}
/* div.horizontal */
div.horizontal {
display: grid;
grid-auto-flow: column;
grid-auto-columns: 100%;
gap: 1ch;
overflow-x: scroll;
}
div.horizontal>* {
margin-block: unset;
}
/* .display.math */
.display.math {
display: block;
text-align: center;
}