walter-boente_book-collection/css/modules/_titles.scss
2026-04-21 15:40:30 +02:00

210 lines
3.9 KiB
SCSS

#section__content{
h1:first-of-type{
// column-span: all;
// height: $content-h;
}
// .before-h1{
// break-after: page;
// }
h1{
// break-before: page;
// break-after: page;
// position: absolute;
// left: 0;
// top: 0;
height: $content-h;
// background-color: red;
display: flex;
flex-direction: column;
justify-content: space-between;
// display: none;
}
h2, h3, h4, h5, h6 {
&::before{
content: attr(data-counter);
}
}
h2, h3 , h4{
break-inside: avoid;
break-after: avoid;
text-wrap: balance;
/* hack for avoiding break-after */
margin-bottom: calc(var(--baseline)*-3);
&::after{
content: '';
display: block;
height: calc(var(--baseline)*3);
}
}
h5, h6 {
break-inside: avoid;
break-after: avoid;
text-wrap: balance;
/* hack for avoiding break-after */
margin-bottom: calc(var(--baseline)*-2);
&::after{
content: '';
display: block;
height: calc(var(--baseline)*2);
// background-color: rgba(255, 255, 0, 0.595);
}
}
h1 + ol + p,
h2 + ol + p,
h3 + ol + p,
h4 + ol + p,
h5 + ol + p,
h6 + ol + p{
text-indent: 0;
}
h1{
font-weight: 200;
font-size: 105px;
line-height: 0.9;
hyphens: auto;
hyphenate-limit-chars: 8 4 3;
span{
display: block;
}
}
h2{
font-size: 22px;
font-weight: 200;
text-transform: uppercase;
text-align: left;
line-height: calc(var(--baseline)*1.4);
margin-top: 6mm;
padding-bottom: 6mm;
hyphens: auto;
padding-left: calc(var(--unit)*1);
position: relative;
max-width: calc(var(--unit)*5);
text-wrap: balance;
&::before{
display: block;
position: absolute;
left: 0;
}
}
h3{
font-weight: 500;
font-size: var(--fs-medium);
line-height: 1.1;
padding-left: calc(var(--unit)*1);
position: relative;
margin-top: 6mm;
padding-bottom: 6mm;
margin-right: 8mm;
&::before{
display: block;
position: absolute;
left: 0;
}
}
h4{
font-weight: normal;
font-size: 1em;
line-height: var(--baseline);
position: relative;
margin-top: 6mm;
padding-bottom: 6mm;
margin-right: 20mm;
padding-left: calc(var(--unit)*2);
text-decoration: 0.5px underline;
text-underline-offset: 3px;
&::before{
display: block;
position: absolute;
left: calc(var(--unit)*1);
text-decoration: none;
}
}
h5{
font-weight: normal;
font-size: 1em;
line-height: calc(var(--baseline)*0.75);
position: relative;
margin-top: calc(var(--baseline)*1);
padding-bottom: calc(var(--baseline)*0.25);
padding-left: $indent;
text-indent: $indent;
&::before{
display: block;
position: absolute;
left: 0;
}
}
h6{
font-weight: normal;
font-size: 1em;
line-height: calc(var(--baseline)*0.75);
position: relative;
margin-top: calc(var(--baseline)*1);
padding-left: $indent;
text-indent: $indent;
&::before{
display: block;
position: absolute;
left: 0;
}
}
}
[data-id="section__content"][data-split-from] > :first-child {
margin-top: 0;
}