update ikiwiki css

urosm 2024-03-03 23:48:07 +01:00
parent f8809fc020
commit 9a6a1878a6
1 changed files with 43 additions and 33 deletions

View File

@ -15,8 +15,7 @@
--main-gap-v: 0;
/* font-derived column width */
--max-col-w: calc(100vw - (2 * var(--body-padding-h)) - var(--main-gap-h) - 1ch);
--col-w: clamp(32ch, 72ch, var(--max-col-w));
--col-w: clamp(34ch, 74ch, 100vw);
/* colors */
--fg-c: #000000;
@ -65,8 +64,6 @@ article {
}
article h1:before {
content:
counter(heading)". ";
counter-increment: heading;
}
@ -76,7 +73,6 @@ article h1 {
article h2:before {
content:
counter(heading)"."
counter(subheading)". ";
counter-increment: subheading;
}
@ -87,7 +83,6 @@ article h2 {
article h3:before {
content:
counter(heading)"."
counter(subheading)"."
counter(subsubheading)". ";
counter-increment: subsubheading;
@ -99,7 +94,6 @@ article h3 {
article h4:before {
content:
counter(heading)"."
counter(subheading)"."
counter(subsubheading)"."
counter(subsubsubheading)". ";
@ -112,7 +106,6 @@ article h4 {
article h5:before {
content:
counter(heading)"."
counter(subheading)"."
counter(subsubheading)"."
counter(subsubsubheading)"."
@ -126,7 +119,6 @@ article h5 {
article h6:before {
content:
counter(heading)"."
counter(subheading)"."
counter(subsubheading)"."
counter(subsubsubheading)"."
@ -136,20 +128,40 @@ article h6:before {
}
/* text content */
:is(blockquote, dl, figure, menu, ol, p, pre, ul) +
:is(blockquote, dl, figure, menu, ol, p, pre, ul) {
:is(article :is(blockquote, dl, figure, menu, ol, p, pre, ul, div)) +
:is(article :is(blockquote, dl, figure, menu, ol, p, pre, ul, div)) {
margin-block-start: var(--v-un);
}
:is(blockquote, dl, figure, menu, ol, p, pre, ul) +
:is(h1, h2, h3, h4, h5, h6) {
: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);
}
:is(h1, h2, h3, h4, h5, h6) +
:is(blockquote, dl, figure, menu, ol, p, pre, ul) {
: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);
}
: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);
}
: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);
}
:is(article :is(address, article, aside, footer, header, hgroup, nav, section, search)) +
: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)) +
:is(article :is(address, article, aside, footer, header, hgroup, nav, section, search)) {
margin-block-start: var(--v-un);
}
@ -180,6 +192,14 @@ hr:after {
content: "---";
}
dt {
font-style: italic;
}
dd {
padding-inline-start: calc(4 * var(--h-un));
}
/* inline text semantics */
a {
cursor: pointer;
@ -203,29 +223,19 @@ a:visited:active {
}
/* layout */
body {
width: 100vw;
height: 100vh;
padding: var(--body-padding-v) var(--body-padding-h);
}
body>main {
height: 100%;
margin: 0 auto;
width: max-content;
height: 100vh;
display: grid;
grid-auto-flow: column;
grid-auto-columns: var(--col-w);
gap: var(--main-gap-v) var(--main-gap-h);
grid-template-columns: repeat(3, var(--col-w));
overflow-x: scroll;
}
body>main>article {
body>main>* {
overflow-y: scroll;
}
body>main>article>header {
margin-block-end: var(--v-un);
}
body>main>article>footer {
margin-block-start: var(--v-un);
body>main>*>article {
padding: var(--v-un) var(--h-un);
}