title chapter

This commit is contained in:
Julie Blanc 2026-04-09 19:37:52 +02:00
parent 5cb765701a
commit 9ed0fb0d1d
9 changed files with 302 additions and 126 deletions

View file

@ -1,14 +1,14 @@
@charset "UTF-8";
:root {
--font: 'Akkurat Std', sans-serif;
--font-serif: 'Edgar', sans-serif;
--font-title: 'Allium Rounded', sans-serif;
--font-sans: 'Allium Rounded', sans-serif;
--font: 'Moulin', sans-serif;
--font-serif: 'Moulin', sans-serif;
--font-title: 'Louize', sans-serif;
--font-sans: 'Basis Grotesque Pro', sans-serif;
--font-size: 11px;
--fs-small: 8.5px;
--fs-num: 14px;
--baseline: 16px;
--indent: 26px;
--fs-num: 10px;
}
* {
@ -34,43 +34,45 @@ body {
@media print {
@page {
size: 176mm 240mm;
margin-top: 36px;
margin-bottom: 20mm;
bleed: 6mm;
marks: crop;
margin-top: 10mm;
margin-bottom: 12mm;
}
@page :left {
margin-left: 18mm;
margin-right: 26mm;
margin-left: 14mm;
margin-right: 20mm;
@bottom-left {
content: counter(page);
font-family: var(--font-title);
font-weight: 500;
font-family: var(--font-sans);
font-size: var(--fs-num);
text-align: left;
}
@bottom-center {
content: "Höchstpersönlichkeit";
font-family: var(--font-sans);
font-size: var(--fs-num);
text-align: left;
}
}
@page :right {
margin-left: 26mm;
margin-right: 18mm;
margin-left: 20mm;
margin-right: 14mm;
@bottom-right {
content: counter(page);
font-family: var(--font-title);
font-weight: 500;
font-family: var(--font-sans);
font-size: var(--fs-num);
text-align: right;
}
@right-top {
content: "Höchstpersönlichkeit";
font-family: var(--font-title);
font-weight: normal;
transform-origin: top left;
height: calc(var(--baseline) * 2);
word-spacing: nowrap;
width: 52ch;
transform: rotate(90deg);
@bottom-left {
content: string(chapterCount);
font-family: var(--font-sans);
font-size: var(--fs-num);
text-align: left;
}
@bottom-center {
content: string(chapter);
font-family: var(--font-sans);
font-size: var(--fs-num);
text-align: left;
position: relative;
left: 14mm;
padding-left: 5px;
}
}
@page :first {
@ -173,12 +175,90 @@ body {
content: none;
}
}
@page chapter {
@top-left-corner {
content: none;
}
@top-left {
content: none;
}
@top-center {
content: none;
}
@top-right {
content: none;
}
@top-right-corner {
content: none;
}
@left-top {
content: none;
}
@left-middle {
content: none;
}
@left-bottom {
content: none;
}
@right-top {
content: none;
}
@right-middle {
content: none;
}
@right-bottom {
content: none;
}
@bottom-left-corner {
content: none;
}
@bottom-left {
content: none;
}
@bottom-center {
content: none;
}
@bottom-right {
content: none;
}
@bottom-right-corner {
content: none;
}
}
}
#section__content {
-moz-column-break-before: right;
break-before: right;
}
.page-break {
-moz-column-break-before: page;
break-before: page;
}
#section__content {
-moz-columns: 2;
columns: 2;
-moz-column-fill: auto;
column-fill: auto;
}
#section__content h1 {
-moz-column-break-before: left;
break-before: left;
-moz-column-break-after: page;
break-after: page;
page: chapter;
}
#section__content h1 .h1-count {
string-set: chapterCount content(text);
}
#section__content h1 .h1-text {
string-set: chapter content(text);
}
sup {
line-height: 0;
}
@ -262,16 +342,18 @@ ol[type="1"] li::before {
top: -1px;
}
#section__content {
margin-left: 28mm;
#section__content h1 {
-moz-column-span: all;
column-span: all;
height: 217mm;
}
#section__content h1::before, #section__content h2::before, #section__content h3::before {
#section__content h2::before, #section__content h3::before {
content: attr(data-counter);
}
#section__content h4::before, #section__content h5::before, #section__content h6::before {
content: attr(data-counter) ". ";
}
#section__content h1, #section__content h2, #section__content h3, #section__content h4 {
#section__content h2, #section__content h3, #section__content h4 {
-moz-column-break-inside: avoid;
break-inside: avoid;
-moz-column-break-after: avoid;
@ -280,7 +362,7 @@ ol[type="1"] li::before {
/* hack for avoiding break-after */
margin-bottom: calc(var(--baseline) * -3);
}
#section__content h1::after, #section__content h2::after, #section__content h3::after, #section__content h4::after {
#section__content h2::after, #section__content h3::after, #section__content h4::after {
content: "";
display: block;
height: calc(var(--baseline) * 3);
@ -307,6 +389,21 @@ ol[type="1"] li::before {
#section__content h6 + ol + p {
text-indent: 0;
}
#section__content h1 {
font-weight: 200;
font-size: 98px;
line-height: 1;
hyphens: auto;
-moz-column-break-inside: avoid;
break-inside: avoid;
display: flex;
flex-direction: column;
justify-content: space-between;
text-align: center;
}
#section__content h1 span {
display: block;
}
#section__content h2 {
font-family: var(--font-title);
font-size: 1.1rem;
@ -375,24 +472,6 @@ ol[type="1"] li::before {
margin-top: 0;
}
h1 {
font-family: var(--font-title);
font-size: 1.6rem;
font-weight: 500;
text-transform: uppercase;
line-height: calc(var(--baseline) * 1.6);
position: relative;
margin-top: calc(var(--baseline) * 2 - 3px);
padding-bottom: calc(var(--baseline) * 1);
padding-left: calc(var(--indent) * 2);
padding-right: 1ch;
}
h1::before {
position: absolute;
left: 0;
width: calc(var(--indent) * 2 - 0.5ch);
}
section h1:first-of-type {
margin-top: 3px !important;
}