bavbavhaus.net/css/style.css

439 lines
6.2 KiB
CSS
Raw Normal View History

2024-06-27 11:50:00 +02:00
/*
* css styling for bavbavhaus.net
*
* A dark mono-sized monofont, two-column layout stylesheet with "compact"
* markdown formatting of html generated by `pandoc`.
*
2024-06-30 18:10:12 +02:00
*/
2024-06-27 11:50:00 +02:00
2024-09-01 17:30:44 +02:00
2024-01-14 23:03:14 +01:00
/* variables */
2024-06-27 11:50:00 +02:00
2024-01-12 15:08:12 +01:00
:root {
2024-09-01 17:30:44 +02:00
--font-size: 12pt;
2024-08-13 16:32:13 +02:00
--line-height: 1.25;
2024-01-14 23:03:14 +01:00
--font-family: monospace;
/* colors */
2024-05-21 00:52:32 +02:00
--black: #000000;
--red: #fa3500;
--green: #009843;
--orange: #d06600;
--blue: #856cff;
--magenta: #ff1170;
--cyan: #008cca;
--white: #e2e2e2;
--bright-black: #848484;
--bright-red: #ff888e;
--bright-green: #00c55b;
--bright-orange: #ff8d48;
--bright-blue: #ac9fff;
--bright-magenta: #ffb1c0;
--bright-cyan: #92ccff;
--bright-white: #ffffff;
2024-06-27 11:50:00 +02:00
--md-formatting-color: var(--blue);
--error-color: var(--red);
2024-01-14 23:03:14 +01:00
}
2024-06-27 11:50:00 +02:00
/* wider screens */
2024-06-26 22:17:59 +02:00
@media (min-width: 120ch) {
2024-06-21 15:29:55 +02:00
:root {
--font-size: 12pt;
}
2024-06-09 12:11:23 +02:00
}
2024-01-12 15:08:12 +01:00
/* reset */
2024-04-22 15:21:20 +02:00
2024-06-27 11:50:00 +02:00
:root {
box-sizing: border-box;
text-size-adjust: none;
-moz-text-size-adjust: none;
-webkit-text-size-adjust: none;
}
*,
*::before,
*::after {
box-sizing: inherit;
margin: 0;
padding: 0;
2024-09-01 17:30:44 +02:00
border: 0;
2024-03-17 16:54:31 +01:00
}
2024-06-27 11:50:00 +02:00
/* root, * */
2024-04-22 15:21:20 +02:00
2024-01-14 23:03:14 +01:00
:root {
2024-08-13 16:32:13 +02:00
color: var(--white);
background-color: var(--black);
2024-01-14 23:03:14 +01:00
font: var(--font-size)/var(--line-height) var(--font-family);
2024-06-27 11:50:00 +02:00
overflow-wrap: break-word;
}
*,
*::before,
*::after {
font: inherit;
scrollbar-width: none;
2024-01-14 23:03:14 +01:00
}
2024-05-21 00:52:32 +02:00
::selection {
2024-06-09 02:41:45 +02:00
color: var(--black);
background-color: var(--white);
2024-05-21 00:52:32 +02:00
}
2024-06-27 11:50:00 +02:00
/* blocks */
2024-01-14 23:03:14 +01:00
2024-01-12 15:08:12 +01:00
h1, h2, h3, h4, h5, h6 {
2024-06-27 11:50:00 +02:00
text-wrap: balance;
2024-06-09 02:36:42 +02:00
font-weight: bold;
2024-03-19 02:08:26 +01:00
}
2024-09-08 02:46:15 +02:00
h1::before { content: "# "; }
h2::before { content: "## "; }
h3::before { content: "### "; }
h4::before { content: "#### "; }
h5::before { content: "##### "; }
h6::before { content: "###### "; }
2024-06-09 02:36:42 +02:00
2024-06-27 11:50:00 +02:00
:is(h1, h2, h3, h4, h5, h6)::before {
color: var(--md-formatting-color);
2024-06-09 02:36:42 +02:00
}
article :is(h2, h3, h4, h5, h6) {
2024-06-27 11:50:00 +02:00
margin-top: 2rlh;
2024-06-09 02:36:42 +02:00
}
2024-06-27 11:50:00 +02:00
article :is(blockquote, dl, div, figure, hr, menu, ol, p, pre, ul) {
margin-top: 1rlh;
2024-06-09 02:36:42 +02:00
}
2024-06-27 11:50:00 +02:00
article :is(blockquote, div)>:is(blockquote, div, figure, hr, menu, ol, p, pre, ul):first-child {
margin-top: unset;
2024-06-09 02:36:42 +02:00
}
2024-06-27 11:50:00 +02:00
blockquote,
figcaption,
dd {
position: relative;
2024-09-08 02:46:15 +02:00
margin-left: 2ch;
2024-03-19 02:08:26 +01:00
}
2024-06-27 11:50:00 +02:00
blockquote::before,
figcaption::before,
dd::before {
position: absolute;
2024-09-08 02:46:15 +02:00
left: -2ch;
2024-06-27 11:50:00 +02:00
color: var(--md-formatting-color);
2024-01-12 15:08:12 +01:00
}
2024-01-14 23:03:14 +01:00
2024-06-27 11:50:00 +02:00
blockquote::before {
2024-09-08 02:46:15 +02:00
content: "> ";
2024-01-12 15:08:12 +01:00
}
2024-01-14 23:03:14 +01:00
2024-06-27 11:50:00 +02:00
figcaption::before {
2024-09-08 02:46:15 +02:00
content: "! ";
2024-06-08 23:05:41 +02:00
}
2024-06-27 11:50:00 +02:00
dd::before {
2024-09-08 02:46:15 +02:00
content: ": ";
2024-01-14 23:03:14 +01:00
}
2024-03-18 21:08:22 +01:00
dt {
font-style: italic;
2024-03-17 16:54:31 +01:00
}
2024-06-27 11:50:00 +02:00
figure {
display: grid;
grid-template-rows: round(down, calc(min(160ch, 100vw)/2), 1rlh) auto;
2024-06-08 23:31:10 +02:00
}
2024-06-27 11:50:00 +02:00
figure img {
place-self: center;
2024-01-14 23:03:14 +01:00
}
2024-06-27 11:50:00 +02:00
hr {
2024-08-13 16:32:13 +02:00
color: unset;
border: unset;
2024-06-09 11:57:37 +02:00
}
2024-06-27 11:50:00 +02:00
hr::after {
2024-08-13 16:31:42 +02:00
content: "***";
2024-09-08 02:46:15 +02:00
margin-left: round(down, calc(50% - 1.5ch), 1ch);
2024-06-27 11:50:00 +02:00
color: var(--md-formatting-color);
2024-06-09 02:36:42 +02:00
}
2024-06-27 11:50:00 +02:00
:is(ol, ul, menu, dd, li) :is(blockquote, div, figure, hr, menu, ol, p, pre, ul) {
margin-top: unset;
2024-06-09 02:36:42 +02:00
}
2024-06-30 18:10:12 +02:00
ul, menu {
2024-09-08 02:46:15 +02:00
padding-left: 2ch;
2024-05-02 20:16:54 +02:00
}
2024-06-30 18:10:12 +02:00
ol {
2024-09-08 02:46:15 +02:00
padding-left: 3ch;
2024-01-14 23:03:14 +01:00
}
2024-06-30 18:10:12 +02:00
ol:has(li:nth-child(10)) {
2024-09-08 02:46:15 +02:00
padding-left: 4ch;
2024-01-14 23:03:14 +01:00
}
2024-06-30 18:10:12 +02:00
ol:has(li:nth-child(100)) {
2024-09-08 02:46:15 +02:00
padding-left: 5ch;
2024-06-30 18:10:12 +02:00
}
2024-06-08 23:31:10 +02:00
li::marker {
2024-06-27 11:50:00 +02:00
color: var(--md-formatting-color);
2024-06-09 02:36:42 +02:00
}
ol>li::marker {
2024-09-08 02:46:15 +02:00
content: counter(list-item) ". ";
2024-03-18 21:08:22 +01:00
}
2024-01-14 23:03:14 +01:00
ul>li::marker {
2024-09-08 02:46:15 +02:00
content: "- ";
2024-06-08 23:31:10 +02:00
}
2024-06-27 11:50:00 +02:00
li p + p {
text-indent: 2ch;
2024-01-14 23:03:14 +01:00
}
2024-06-27 11:50:00 +02:00
p {
hyphens: auto;
2024-01-12 15:08:12 +01:00
}
2024-03-18 21:08:22 +01:00
pre {
2024-06-27 11:50:00 +02:00
overflow-x: scroll;
2024-01-14 23:03:14 +01:00
}
2024-06-26 16:03:06 +02:00
pre::before,
pre::after {
display: block;
content: "```";
2024-06-27 11:50:00 +02:00
color: var(--md-formatting-color);
2024-06-26 16:03:06 +02:00
}
2024-06-27 11:50:00 +02:00
img, svg {
max-width: 100%;
max-height: 100%;
display: block;
}
2024-06-30 18:10:12 +02:00
.math.diplay {
display: block;
text-align: center;
}
2024-06-27 11:50:00 +02:00
.math.display::before,
.math.display::after {
content: "$$";
color: var(--md-formatting-color);
2024-01-14 23:03:14 +01:00
}
2024-06-27 11:50:00 +02:00
/* inlines */
a {
color: inherit;
cursor: pointer;
2024-08-03 15:58:55 +02:00
text-decoration: underline solid;
text-decoration-color: var(--md-formatting-color);
2024-01-14 23:03:14 +01:00
}
2024-06-26 17:36:39 +02:00
a:active {
color: var(--red);
2024-06-09 02:36:42 +02:00
text-decoration-color: var(--red);
2024-01-14 23:03:14 +01:00
}
a:visited {
2024-06-09 02:36:42 +02:00
text-decoration-color: var(--magenta);
2024-01-14 23:03:14 +01:00
}
a:visited:active {
2024-06-09 02:36:42 +02:00
text-decoration-color: var(--red);
2024-01-14 23:03:14 +01:00
}
2024-06-27 11:50:00 +02:00
code {
font-family: monospace;
}
2024-06-26 16:03:06 +02:00
:not(pre)>code::before,
:not(pre)>code::after {
content: "`";
2024-06-30 18:21:06 +02:00
color: var(--md-formatting-color);
2024-03-19 02:08:26 +01:00
}
2024-06-27 11:50:00 +02:00
em {
font-style: italic;
}
mark {
color: var(--orange);
background: unset;
}
strong {
font-weight: bold;
}
sup, sub {
font-size: unset;
vertical-align: unset;
2024-05-16 23:09:03 +02:00
line-height: 0;
}
2024-06-27 11:50:00 +02:00
sup::before,
sup::after {
content: "^";
color: var(--md-formatting-color);
}
2024-04-22 15:21:20 +02:00
2024-06-27 11:50:00 +02:00
sub::before,
sub::after {
content: "~";
color: var(--md-formatting-color);
}
2024-05-02 20:16:54 +02:00
2024-06-27 11:50:00 +02:00
u {
2024-06-30 18:10:12 +02:00
text-decoration: underline wavy var(--red) 1pt;
2024-06-27 11:50:00 +02:00
}
del, ins {
text-decoration: unset;
2024-05-02 20:16:54 +02:00
}
2024-06-27 11:50:00 +02:00
del { color: var(--red); }
del::before { content: "[-"; }
del::after { content: "-]"; }
2024-05-02 20:16:54 +02:00
2024-06-27 11:50:00 +02:00
ins { color: var(--green); }
ins::before { content: "{+"; }
ins::after { content: "+}"; }
.math.inline::before,
.math.inline::after {
content: "$";
color: var(--md-formatting-color);
}
2024-06-30 18:10:12 +02:00
.smallcaps {
font-variant: small-caps;
}
2024-06-27 11:50:00 +02:00
/* tables */
2024-04-22 15:21:20 +02:00
table {
2024-06-27 11:50:00 +02:00
display: block;
margin-top: 1rlh;
margin-left: auto;
margin-right: auto;
2024-06-21 15:29:55 +02:00
border-spacing: 0;
2024-06-27 11:50:00 +02:00
overflow-x: scroll;
}
thead {
font-weight: bold;
overflow-x: scroll;
2024-04-22 15:21:20 +02:00
}
th, td {
2024-06-27 11:50:00 +02:00
padding-left: 1ch;
padding-right: 1ch;
2024-04-22 15:21:20 +02:00
}
th {
2024-06-27 11:50:00 +02:00
vertical-align: bottom;
border-bottom: 1pt solid white;
2024-04-22 15:21:20 +02:00
}
2024-06-27 11:50:00 +02:00
td {
2024-06-21 15:29:55 +02:00
vertical-align: baseline;
}
table caption {
text-align: unset;
}
table caption::before {
2024-09-08 02:46:15 +02:00
content: "! ";
2024-06-27 11:50:00 +02:00
color: var(--md-formatting-color);
2024-04-22 15:21:20 +02:00
}
2024-06-27 11:50:00 +02:00
2024-06-30 18:10:12 +02:00
/* footnotes */
2024-03-18 21:08:22 +01:00
2024-06-30 18:10:12 +02:00
a.footnote-ref sup::before {
2024-09-08 02:46:15 +02:00
content: "[";
2024-06-27 11:50:00 +02:00
}
2024-03-19 02:08:26 +01:00
2024-06-30 18:10:12 +02:00
a.footnote-ref sup::after {
content: "]";
2024-03-18 21:08:22 +01:00
}
2024-06-09 11:57:37 +02:00
2024-06-30 18:21:06 +02:00
a.footnote-ref:active sup::before,
a.footnote-ref:active sup::after {
color: var(--red);
}
2024-06-26 22:17:59 +02:00
#footnotes>ol {
2024-09-08 02:46:15 +02:00
padding-left: 5ch;
}
#footnotes>ol:has(li:nth-child(10)) {
padding-left: 6ch;
2024-06-26 22:17:59 +02:00
}
2024-09-08 02:46:15 +02:00
#footnotes>ol:has(li:nth-child(100)) {
padding-left: 7ch;
2024-06-26 22:17:59 +02:00
}
2024-06-30 18:10:12 +02:00
#footnotes>ol>li::marker {
2024-09-08 02:46:15 +02:00
content: "[" counter(list-item) "]: ";
2024-06-30 18:10:12 +02:00
}
#footnotes a.footnote-back {
2024-06-30 18:21:06 +02:00
color: var(--md-formatting-color);
2024-06-30 18:10:12 +02:00
}
#footnotes a.footnote-back:active {
2024-06-26 17:36:39 +02:00
color: var(--red);
}
2024-06-30 18:10:12 +02:00
/* div.horizontal */
div.horizontal {
display: grid;
grid-auto-flow: column;
grid-auto-columns: 100%;
overflow-x: scroll;
scroll-snap-type: inline proximity;
}
div.horizontal>* {
margin-top: unset;
scroll-snap-align: end;
}
2024-09-08 02:46:15 +02:00
/* layout */
2024-06-30 18:10:12 +02:00
2024-09-08 02:46:15 +02:00
body {
width: min(80ch, round(down, 100vw, 2ch));
height: round(down, 100vh, 1rlh);
margin-left: auto;
margin-right: auto;
padding-top: 1rlh;
padding-bottom: 1rlh;
2024-08-03 15:58:55 +02:00
}
2024-09-08 02:46:15 +02:00
main {
height: 100%;
2024-08-03 15:58:55 +02:00
}
2024-09-08 02:46:15 +02:00
main>article {
height: 100%;
overflow-y: scroll;
2024-09-01 17:30:44 +02:00
}