Refactor style.css

This commit is contained in:
2023-04-16 02:01:41 +02:00
parent 8c05a54dee
commit e7d4d35f4e

View File

@@ -1,30 +1,30 @@
:root { :root {
font-family: "Times New Roman", serif; font-family: "Times New Roman", serif;
line-height: 1; line-height: 1;
} }
* { * {
box-sizing: border-box; box-sizing: border-box;
} }
body { body {
margin: 0; margin: 0;
} }
.m1, .m2, .m3 { .m1, .m2, .m3 {
height: 0; height: 0;
width: 1cm; width: 1cm;
position: fixed; position: fixed;
left: 0; left: 0;
border-top: 1pt solid black; border-top: 1pt solid black;
} }
.m1 {top: 105mm;} .m1 {top: 105mm;}
.m2 {top: 148.5mm;} .m2 {top: 148.5mm;}
.m3 {top: 210mm;} .m3 {top: 210mm;}
header { header {
height: 45mm; height: 45mm;
padding: 5mm; padding: 5mm;
position: absolute; position: absolute;
@@ -32,16 +32,16 @@
left: 0; left: 0;
right: 0; right: 0;
text-align: center; text-align: center;
} }
.spacing {height: 20mm;} .spacing {height: 20mm;}
.info-wrapper { .info-wrapper {
width: 100%; width: 100%;
height:45mm; height:45mm;
margin: 0 0 8.46mm 0; margin: 0 0 8.46mm 0;
position: relative; position: relative;
} }
.address-wrapper { .address-wrapper {
height: 45mm; height: 45mm;
width: 85mm; width: 85mm;
margin: 0; margin: 0;
@@ -52,99 +52,99 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-end; justify-content: flex-end;
} }
.address-wrapper .sender { .address-wrapper .sender {
flex: 17.7mm 1 1; flex: 17.7mm 1 1;
font-size: 8pt; font-size: 8pt;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-end; justify-content: flex-end;
padding-bottom: 2mm; padding-bottom: 2mm;
} }
address { address {
flex: 27.3mm 1 1; flex: 27.3mm 1 1;
white-space: pre-line; white-space: pre-line;
font-size: 12pt; font-size: 12pt;
font-style: normal; font-style: normal;
} }
aside { aside {
height: 40mm; height: 40mm;
width: 75mm; width: 75mm;
margin: 0; margin: 0;
position: absolute; position: absolute;
left: 125mm; left: 125mm;
top: 5mm; top: 5mm;
} }
main { main {
margin: 8.46mm 20mm 4.23mm 25mm; margin: 8.46mm 20mm 4.23mm 25mm;
} }
main :first-child { main :first-child {
margin-top: 0; margin-top: 0;
} }
main h1, main p { main h1, main p {
font-size: 12pt; font-size: 12pt;
margin: 1em 0; margin: 1em 0;
text-align: justify; text-align: justify;
widows: 3; widows: 3;
orphans: 3; orphans: 3;
} }
main .date { main .date {
margin-bottom: 2em; margin-bottom: 2em;
text-align: right; text-align: right;
} }
main h1 { main h1 {
margin-bottom: 2em; margin-bottom: 2em;
} }
.footer-wrapper { .footer-wrapper {
padding: 0 20mm 0 25mm; padding: 0 20mm 0 25mm;
position: running(page-footer); position: running(page-footer);
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
} }
.pre-footer { .pre-footer {
margin: 4.23mm 0; margin: 4.23mm 0;
font-size: 10pt; font-size: 10pt;
display: flex; display: flex;
} }
.pre-footer .date, .pre-footer .page { .pre-footer .date, .pre-footer .page {
flex: 100px 1 1; flex: 100px 1 1;
} }
.pre-footer .date {text-align: left;} .pre-footer .date {text-align: left;}
.pre-footer .page {text-align: right;} .pre-footer .page {text-align: right;}
.page::after { .page::after {
content: "Seite 1 von 1"; content: "Seite 1 von 1";
} }
footer { footer {
font-size: 10pt; font-size: 10pt;
border-top: 1pt solid black; border-top: 1pt solid black;
height: 25mm; height: 25mm;
padding-top: 1mm; padding-top: 1mm;
text-align: center; text-align: center;
} }
@page { @page {
size: A4; size: A4;
margin: 25mm 0 35mm 0; margin: 25mm 0 35mm 0;
@bottom-center { @bottom-center {
content: element(page-footer); content: element(page-footer);
} }
} }
@media screen { @media screen {
body, header, .footer-wrapper { body, header, .footer-wrapper {
width: 210mm; width: 210mm;
} }
@@ -164,13 +164,13 @@
right: 0; right: 0;
background: white; background: white;
} }
} }
@media print { @media print {
.page::after { .page::after {
content: "Seite " counter(page) " von " counter(pages); content: "Seite " counter(page) " von " counter(pages);
} }
.footer-wrapper { .footer-wrapper {
display: none; display: none;
} }
} }