Mainly experimental stuff for print

This commit is contained in:
Stephan 2016-12-15 11:44:35 +01:00
parent ed66b9f6ee
commit d91c029d4d
7 changed files with 245 additions and 69 deletions

View file

@ -1,19 +1,109 @@
// Print elements
// -----------------------------------------------------------------------------
.div_print {
margin: $space_3 auto;
%paper {
background-color: $white;
}
.dina4 {
width: 21.0cm;
height: 29.7cm;
padding: 1.2cm 1.2cm 1.2cm 2.4cm;
}
$a4: ".dina4" 1.2cm 1.2cm 1.2cm 2.4cm;
$a5: ".dina5" 0 0 0 1.2cm;
$a6: ".dina6" 0 0 0 1.2cm;
.dina5 {
width: 14.8cm;
height: 21.0cm;
padding: 1.2cm 0.6cm 0.6cm 2.4cm;
}
$din: $a4, $a5, $a6;
.print_body {
font-size: $basic_print_size;
@page {
size: A4;
margin: 4cm;
}
@page:first {
size: A4;
margin: 0;
}
@each $space in $din {
#{nth($space, 1)} {
padding-top: nth($space, 2);
padding-right: nth($space, 3);
padding-bottom: nth($space, 4);
padding-left: nth($space, 5);
.page_head, .page_foot {
right: nth($space, 3);
left: nth($space, 5);
}
.page_head {
top: nth($space, 2);
}
.page_foot {
bottom: nth($space, 4);
}
}
}
*[class^="din"] {
@extend %paper;
position: relative;
overflow: auto;
.page_head, .page_foot {
position: absolute;
}
.page_head {
page: cover;
}
.page_foot {
display: flex;
flex-direction: row;
*:last-child {
margin-bottom: 0;
}
p {
flex: 1 0 auto;
font-size: 8pt;
}
.page_no {
flex: 1 0 auto;
font-size: 20pt;
text-align: right;
}
}
.page_content {
margin-top: 10cm;
}
margin: $space_3 auto;
}
.page_title, .page_date {
font-size: 14pt;
}
.page_title {
margin: 0;
}
.page_date, .page_no {
@extend %head_1;
float: right;
}
.page_author {
position: absolute;
top: 5cm;
right: 0;
text-align: right;
}
.page_recipient {
position: absolute;
top: 5cm;
left: 0;
}
}