bavbavhaus.net/public_html/css/style.css

199 lines
3.9 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;
/* gaps and paddings */
--body-padding-h: var(--h-un);
--body-padding-v: var(--v-un);
--main-gap-h: calc(2 * var(--h-un));
--main-gap-v: 0;
/* font-derived column width */
2024-03-17 16:54:31 +01:00
--col-w: calc(clamp(33.33vw, 74ch, 100vw) - 2ch);
2024-02-11 23:54:25 +01:00
/* colors */
--fg-c: #000000;
--bg-c: #ffffff;
--link-c: hsl(240 100% 50%);
--visited-c: hsl(270 100% 50%);
--active-c: hsl(0 100% 50%);
}
@media (prefers-color-scheme: dark) {
:root {
--fg-c: #ffffff;
--bg-c: #000000;
--link-c: hsl(240 100% 75%);
--visited-c: hsl(270 100% 75%);
--active-c: hsl(0 100% 75%);
}
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-17 16:54:31 +01:00
*:focus {
outline: var(--link-c) solid 1px;
}
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
}
/* 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;
font-weight: bold;
2024-01-12 15:08:12 +01:00
}
2024-02-11 23:54:25 +01:00
/* text content */
2024-03-17 16:54:31 +01:00
/*
2024-03-03 23:48:07 +01:00
:is(article :is(blockquote, dl, figure, menu, ol, p, pre, ul, div)) +
:is(article :is(blockquote, dl, figure, menu, ol, p, pre, ul, div)) {
2024-02-12 10:12:21 +01:00
margin-block-start: var(--v-un);
}
2024-03-03 23:48:07 +01:00
:is(article :is(blockquote, dl, figure, menu, ol, p, pre, ul)) +
:is(article :is(h1, h2, h3, h4, h5, h6)) {
margin-block-start: calc(2 * var(--v-un));
margin-block-end: var(--v-un);
}
2024-03-04 08:55:56 +01:00
:is(article :is(blockquote, dl, figure, menu, ol, p, pre, ul, div)) +
:is(article :is(address, article, aside, footer, header, hgroup, nav, section, search)) {
margin-block-start: var(--v-un);
}
2024-03-03 23:48:07 +01:00
:is(article :is(h1, h2, h3, h4, h5, h6)) +
:is(article :is(blockquote, dl, figure, menu, ol, p, pre, ul)) {
margin-block-start: var(--v-un);
}
2024-03-04 08:55:56 +01:00
:is(article :is(h1, h2, h3, h4, h5, h6)) +
:is(article :is(h1, h2, h3, h4, h5, h6)) {
margin-block-start: calc(2 * var(--v-un));
margin-block-end: var(--v-un);
}
:is(article :is(h1, h2, h3, h4, h5, h6)) +
2024-03-03 23:48:07 +01:00
:is(article :is(address, article, aside, footer, header, hgroup, nav, section, search)) {
margin-block-start: var(--v-un);
}
:is(article :is(address, article, aside, footer, header, hgroup, nav, section, search)) +
:is(article :is(blockquote, dl, figure, menu, ol, p, pre, ul, div)) {
margin-block-start: var(--v-un);
}
2024-02-12 10:12:21 +01:00
2024-03-03 23:48:07 +01:00
:is(article :is(address, article, aside, footer, header, hgroup, nav, section, search)) +
:is(article :is(h1, h2, h3, h4, h5, h6)) {
2024-03-17 16:54:31 +01:00
}*/
article :is(h1, h2, h3, h4, h5, h6) {
2024-02-12 10:12:21 +01:00
margin-block-start: calc(2 * var(--v-un));
margin-block-end: var(--v-un);
}
2024-03-17 16:54:31 +01:00
article :is(blockquote, dl, figure, menu, ol, p, pre, ul, div) {
margin-block-start: var(--v-un);
}
2024-01-14 23:04:54 +01:00
blockquote {
2024-02-11 23:54:25 +01:00
margin-inline: calc(4 * var(--h-un));
}
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-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-17 18:21:40 +01:00
margin-block-start: var(--v-un);
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-03 23:48:07 +01:00
dt {
font-style: italic;
}
dd {
padding-inline-start: calc(4 * var(--h-un));
}
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);
}
/* 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-02-11 23:54:25 +01:00
2024-03-17 16:54:31 +01: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-01-14 23:04:54 +01:00
}
2024-03-17 16:54:31 +01:00
/* fenced divs */
div.horizontal {
display: grid;
grid-auto-flow: column;
grid-auto-columns: 100%;
overflow-x: scroll;
}