234 lines
3.3 KiB
CSS
Raw Normal View History

2025-04-12 11:07:56 +02:00
:root {
--print-margin-x: 8mm;
}
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);
}
@page {
size: A5;
2025-04-12 11:07:56 +02:00
margin: 13mm var(--print-margin-x);
2025-02-15 10:19:38 +01:00
}
2025-04-12 11:07:56 +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-02-15 10:19:38 +01:00
@top-left {
content: "blank " counter(page);
}
}
2025-04-12 11:07:56 +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;
}
@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;
2025-04-12 11:07:56 +02:00
img {
border: 1px solid blue;
}
2025-02-15 10:19:38 +01:00
header {
position: absolute;
margin: 0 0;
top: 50%;
transform: translate3d(0, -50%, 0px);
width: 100%;
}
@top-right {
content: "coverttt";
}
}
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";
}
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;
}
figure[index="3"] {
grid-area: 3;
}
figcaption {
position: absolute;
z-index: 2;
left: 2mm;
bottom: 2mm;
padding: 1mm 2mm;
background: white;
font-size: 7px;
}
img {
object-fit: cover;
width: 100%;
height: 100%;
}
@top-right {
content: "imaaagggee";
}
}
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-02-15 10:19:38 +01:00
@bottom-right {
content: none;
}
header {
position: absolute;
margin: 0 0;
top: 50%;
transform: translate3d(0, -50%, 0px);
width: 100%;
}
}
.header--meta {
display: none;
}
2025-03-01 16:38:05 +01:00
[data-subchapter-title] {
display: none;
}
article:has([data-chapter-title]), article:has([data-subchapter-title]) {
2025-04-12 11:07:56 +02:00
/* break-before: page; */
}
hr {
/* break-after: page; */
opacity: .2;
2025-02-15 10:19:38 +01:00
}
.page--cover {
page: cover;
}
2025-04-12 11:07:56 +02:00
.page--image {
page: image;
break-before: left;
}
2025-02-15 10:19:38 +01:00
[template-type="front"] {
page: front;
counter-reset: page;
}
2025-04-12 11:07:56 +02:00
[template-type="image-spread"] {
page: front;
counter-reset: page;
}
2025-02-16 13:52:06 +01:00
[template-type="circuit"] {
page: circuit;
/* break-before: page;*/
}
2025-02-15 10:19:38 +01:00
.header-section-number {
display: none;
2025-04-08 11:21:21 +02:00
}
.fix-break-left {
break-after: right;
2025-02-15 10:19:38 +01:00
}