bavbavhaus.net/public_html/css/style.css

224 lines
3.2 KiB
CSS
Raw Normal View History

2024-02-11 23:54:25 +01:00
/* variables */
2024-01-12 15:08:12 +01:00
:root {
--font-size: 12pt;
--line-height: 1.625;
2024-02-11 23:54:25 +01:00
--font-family: monospace;
/* font-derived vertical and horizontal units */
--v-un: calc(var(--font-size) * var(--line-height));
--h-un: 1ch;
/* font-derived column width */
2024-03-18 21:08:22 +01:00
--col-w: clamp(33.33vw, 80ch, 100vw);
2024-02-11 23:54:25 +01:00
/* colors */
2024-03-19 02:08:26 +01:00
--fg-c: #000000;
--bg-c: #e2e2e2;
2024-03-18 21:08:22 +01:00
--link-c: #856cff;
--visited-c: #ff1170;
--active-c: #fa3500;
2024-02-11 23:54:25 +01:00
}
@media (prefers-color-scheme: dark) {
:root {
2024-03-19 02:08:26 +01:00
--fg-c: #e2e2e2;
2024-02-11 23:54:25 +01:00
--bg-c: #000000;
}
2024-01-12 15:08:12 +01:00
}
/* reset */
* {
box-sizing: border-box;
2024-02-11 23:54:25 +01:00
margin: unset;
hyphens: auto;
2024-01-12 15:08:12 +01:00
}
2024-02-11 23:54:25 +01:00
2024-03-18 21:08:22 +01:00
::selection {
color: var(--bg-c);
background-color: var(--fg-c);
2024-03-17 16:54:31 +01:00
}
2024-02-11 23:54:25 +01:00
/* root */
:root {
color: var(--fg-c);
background-color: var(--bg-c);
font: var(--font-size)/var(--line-height) var(--font-family);
2024-03-17 16:54:31 +01:00
scrollbar-width: thin;
scrollbar-color: var(--link-c) rgba(0,0,0,0);
2024-02-11 23:54:25 +01:00
}
2024-03-19 02:08:26 +01:00
body {
margin: 0;
}
2024-02-11 23:54:25 +01:00
/* content sectioning */
address {
font-style: unset;
2024-01-12 15:08:12 +01:00
}
2024-02-11 23:54:25 +01:00
2024-01-12 15:08:12 +01:00
h1, h2, h3, h4, h5, h6 {
2024-02-11 23:54:25 +01:00
font-size: unset;
2024-03-19 02:08:26 +01:00
}
h1, h2 {
2024-02-11 23:54:25 +01:00
font-weight: bold;
2024-01-12 15:08:12 +01:00
}
2024-02-11 23:54:25 +01:00
2024-03-19 02:08:26 +01:00
h3, h4, h5, h6 {
font-style: italic;
}
2024-02-11 23:54:25 +01:00
/* text content */
2024-02-12 10:12:21 +01:00
2024-03-18 21:08:22 +01:00
:is(h1, h2, h3, h4, h5, h6) {
2024-03-03 23:48:07 +01:00
margin-block-start: calc(2 * var(--v-un));
margin-block-end: var(--v-un);
}
2024-03-18 21:08:22 +01:00
:is(blockquote, div, dl, figure, hr, menu, ol, p, pre, ul) +
:is(blockquote, div, dl, figure, hr, menu, ol, p, pre, ul) {
2024-03-03 23:48:07 +01:00
margin-block-start: var(--v-un);
}
2024-02-12 10:12:21 +01:00
2024-03-18 21:08:22 +01:00
blockquote {
margin-inline: calc(4 * var(--h-un));
2024-02-12 10:12:21 +01:00
}
2024-03-18 21:08:22 +01:00
dt {
font-style: italic;
2024-03-17 16:54:31 +01:00
}
2024-03-18 21:08:22 +01:00
dd {
padding-inline-start: calc(4 * var(--h-un));
2024-02-11 23:54:25 +01:00
}
ol, ul, menu {
padding-inline-start: calc(4 * var(--h-un));
2024-01-14 23:04:54 +01:00
}
2024-02-11 23:54:25 +01:00
:is(ol, ul, menu) :is(ol, ul, menu) {
margin-block: unset;
2024-01-14 23:04:54 +01:00
}
2024-02-11 23:54:25 +01:00
2024-03-18 21:08:22 +01:00
li :is(blockquote, div, dl, figure, hr, menu, ol, p, pre, ul) {
margin-block: unset;
}
2024-01-14 23:04:54 +01:00
ul>li::marker {
content: "- ";
}
2024-02-11 23:54:25 +01:00
2024-01-12 15:08:12 +01:00
hr {
2024-02-11 23:54:25 +01:00
color: unset;
border: unset;
2024-02-12 10:12:21 +01:00
text-align: center;
}
hr:after {
content: "---";
2024-02-11 23:54:25 +01:00
}
2024-03-18 21:08:22 +01:00
pre {
margin-inline: calc(4 * var(--h-un));
color: var(--link-c);
overflow-y: scroll;
2024-03-03 23:48:07 +01:00
}
2024-02-11 23:54:25 +01:00
/* inline text semantics */
a {
cursor: pointer;
text-decoration: underline;
2024-01-12 15:08:12 +01:00
}
2024-02-11 23:54:25 +01:00
a:link {
color: var(--link-c);
2024-01-12 15:08:12 +01:00
}
2024-02-11 23:54:25 +01:00
a:link:active {
color: var(--active-c);
}
a:visited {
color: var(--visited-c);
}
a:visited:active {
color: var(--active-c);
}
2024-03-19 02:08:26 +01:00
code {
color: var(--link-c);
}
2024-02-11 23:54:25 +01:00
/* layout */
2024-01-12 15:08:12 +01:00
body>main {
2024-03-04 08:55:56 +01:00
width: 100vw;
height: 100vh;
2024-01-12 15:08:12 +01:00
display: grid;
2024-03-04 08:55:56 +01:00
grid-auto-flow: column;
grid-auto-columns: var(--col-w);
2024-01-12 15:08:12 +01:00
overflow-x: scroll;
2024-03-19 02:08:26 +01:00
scroll-snap-type: x proximity;
2024-01-12 15:08:12 +01:00
}
2024-02-11 23:54:25 +01:00
2024-04-12 22:31:22 +02:00
body>main>* {
2024-01-12 15:08:12 +01:00
overflow-y: scroll;
2024-03-03 23:48:07 +01:00
padding: var(--v-un) var(--h-un);
2024-03-19 02:08:26 +01:00
scroll-snap-align: center;
2024-01-14 23:04:54 +01:00
}
2024-03-17 16:54:31 +01:00
2024-03-18 21:08:22 +01:00
article:focus {
outline: none;
}
2024-04-12 22:31:22 +02:00
body>main>article#start>h1>a::before {
content: "> ";
}
body>main>article#start>h1>a:after {
content: " <";
}
2024-03-18 21:08:22 +01:00
/* toc */
nav.toc {
margin-block: var(--v-un);
}
/* footnotes */
aside.footnotes {
margin-block: var(--v-un);
}
aside.footnotes>hr {
font-weight: bold;
}
2024-03-17 16:54:31 +01:00
/* fenced divs */
2024-03-19 02:08:26 +01:00
2024-03-17 16:54:31 +01:00
div.horizontal {
display: grid;
grid-auto-flow: column;
grid-auto-columns: 100%;
2024-03-19 02:08:26 +01:00
gap: calc(2 * var(--h-un));
2024-03-17 16:54:31 +01:00
overflow-x: scroll;
2024-03-19 02:08:26 +01:00
scroll-snap-type: x proximity;
2024-03-17 16:54:31 +01:00
}
2024-03-18 21:08:22 +01:00
div.horizontal>* {
margin-block: unset;
2024-03-19 02:08:26 +01:00
scroll-snap-align: center;
2024-03-18 21:08:22 +01:00
}
2024-03-19 02:08:26 +01:00
/* math */
2024-03-18 21:08:22 +01:00
.display.math {
display: block;
text-align: center;
}
2024-03-19 02:08:26 +01:00
/* fenced pres */
pre.center {
text-align: center;
}