234 lines
3.3 KiB
CSS
Raw Normal View History

2025-04-12 11:07:56 +02:00
:root {
--print-margin-x: 8mm;
}
2025-04-19 12:23:57 +02:00
2025-02-15 10:19:38 +01:00
body {
font-size: var(--font-size-base);
}
.meta [data-generated-date] {
position: running(generatedDate);
}
.meta [data-publication-title] {
position: running(publicationTitle);
}
.meta [data-chapter-title] {
position: running(chapterTitle);
}
2025-04-19 12:23:57 +02:00
.page--cover {
page: cover;
}
.page--image {
page: image;
break-before: left;
}
.spread--image {
page: imagespread;
break-before: left;
}
[template-type="front"] {
page: front;
counter-reset: page;
}
2025-02-15 10:19:38 +01:00
@page {
size: A5;
2025-04-12 11:07:56 +02:00
margin: 13mm var(--print-margin-x);
2025-04-19 12:23:57 +02:00
marks: crop cross;
2025-02-15 10:19:38 +01:00
}
2025-04-19 12:23:57 +02:00
@page: left {
2025-02-15 10:19:38 +01:00
@bottom-left {
content: "page " counter(page);
}
@top-left {
content: element(publicationTitle);
font-size: var(--font-size-base);
font-style: italic;
}
@top-right {
content: element(generatedDate);
font-size: var(--font-size-base);
font-style: italic;
}
}
2025-04-12 11:07:56 +02:00
@page : blank {
2025-04-19 12:23:57 +02:00
background: yellow;
2025-02-15 10:19:38 +01:00
@top-left {
content: "blank " counter(page);
}
}
2025-04-19 12:23:57 +02:00
@page: right {
2025-02-15 10:19:38 +01:00
@top-right {
content: element(chapterTitle);
font-size: var(--font-size-base);
font-style: italic;
}
2025-04-19 12:23:57 +02:00
2025-02-15 10:19:38 +01:00
@bottom-right {
2025-03-01 16:38:05 +01:00
content: counter(page);
2025-02-15 10:19:38 +01:00
}
}
@page cover {
background: var(--accent);
margin-top: auto;
position: relative;
header {
position: absolute;
margin: 0 0;
top: 50%;
transform: translate3d(0, -50%, 0px);
width: 100%;
}
}
2025-04-12 11:07:56 +02:00
@page image {
margin-top: auto;
position: relative;
margin: var(--print-margin-x) var(--print-margin-x);
header {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: grid;
grid-template-columns: 1fr;
grid-template-rows: 1fr;
grid-template-areas: "nul";
grid-column-gap: 4mm;
}
header[data-length="2"] {
grid-template-columns: 1fr;
grid-template-rows: 50% 50%;
grid-template-areas: "nul" "1";
}
header[data-length="3"] {
grid-template-columns: 2fr 1fr;
grid-template-rows: 50% 50%;
grid-template-areas: "nul 1" "nul 2";
}
2025-04-19 12:23:57 +02:00
img {
width: 100%;
height: 100%;
}
2025-04-12 11:07:56 +02:00
figure {
grid-column: 1 / span 2;
grid-row: 1 / span 3;
margin: 0 0;
position: relative;
}
figure[index="0"] {
grid-area: nul;
}
figure[index="1"] {
grid-area: 1;
}
figure[index="2"] {
grid-area: 2;
}
2025-04-19 12:23:57 +02:00
2025-04-12 11:07:56 +02:00
figure[index="3"] {
grid-area: 3;
}
2025-04-19 12:23:57 +02:00
article figure img {
object-fit: cover;
width: 100%;
height: 100%;
display: block;
}
2025-04-12 11:07:56 +02:00
figcaption {
position: absolute;
z-index: 2;
left: 2mm;
bottom: 2mm;
padding: 1mm 2mm;
background: white;
2025-04-19 12:23:57 +02:00
font-size: 8px;
2025-04-12 11:07:56 +02:00
}
@top-right {
content: "imaaagggee";
}
}
2025-04-19 12:23:57 +02:00
@page imagespread {
background: orange;
}
2025-02-15 10:19:38 +01:00
@page front {
background: lightgrey;
position: relative;
@top-right {
content: none;
}
2025-04-12 11:07:56 +02:00
@top-left {
content: none;
}
2025-04-19 12:23:57 +02:00
2025-02-15 10:19:38 +01:00
@bottom-right {
content: none;
}
2025-04-19 12:23:57 +02:00
header, footer {
2025-02-15 10:19:38 +01:00
position: absolute;
margin: 0 0;
top: 50%;
transform: translate3d(0, -50%, 0px);
width: 100%;
2025-04-19 12:23:57 +02:00
max-width: 80%;
2025-02-15 10:19:38 +01:00
}
2025-03-01 16:38:05 +01:00
2025-04-19 12:23:57 +02:00
footer {
top: auto;
bottom: 0;
transform: none;
}
2025-02-15 10:19:38 +01:00
2025-04-12 11:07:56 +02:00
}
2025-04-19 12:23:57 +02:00
article:has([data-chapter-title]), article:has([data-subchapter-title]) {
break-before: page;
2025-02-15 10:19:38 +01:00
}
2025-04-19 12:23:57 +02:00
table {
break-before: page;
2025-04-12 11:07:56 +02:00
}
2025-04-19 12:23:57 +02:00
article>*:first-of-type:is(table) {
margin-top: 0;
2025-02-16 13:52:06 +01:00
}
2025-02-15 10:19:38 +01:00
.header-section-number {
display: none;
2025-04-08 11:21:21 +02:00
}
2025-04-19 12:23:57 +02:00
2025-04-08 11:21:21 +02:00
.fix-break-left {
break-after: right;
2025-04-19 12:23:57 +02:00
}