1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-27 17:00:54 +01:00

Added basic styles for @media print

This commit is contained in:
squidfunk 2016-10-24 18:02:53 +02:00
parent 26b1de049b
commit d3ed8ccec6
7 changed files with 39 additions and 5 deletions

View File

@ -1,3 +1,4 @@
/build
/material
/site
/lib

View File

@ -102,7 +102,7 @@ rules:
- order: smacss
property-units:
- 2
- global: [rem, em, s, vh]
- global: [rem, em, s, vh, mm]
pseudo-element: 2
quotes:
- 2

View File

@ -37,6 +37,11 @@
opacity 0.125s 0.25s;
color: $md-color-black--lighter;
opacity: 0;
// Hide for print
@media print {
display: none;
}
}
// All headers with permalinks have ids

View File

@ -46,12 +46,16 @@ body {
position: relative;
min-height: 100%;
// [tablet portrait -]: Lock body to disable scroll bubbling
@include break-to-device(tablet portrait) {
// Lock body to viewport height (e.g. in search mode)
&[data-md-locked] {
height: 100%;
overflow: hidden;
}
}
}
// Horizontal separators
hr {
@ -160,3 +164,12 @@ hr {
overflow: hidden;
}
}
// ----------------------------------------------------------------------------
// Rules: print styles
// ----------------------------------------------------------------------------
// Add margins to page
@page {
margin: 25mm;
}

View File

@ -30,6 +30,11 @@
bottom: 0;
width: 100%;
// Hide for print
@media print {
display: none;
}
// Footer container
&__inner {
background: $md-color-black;

View File

@ -36,6 +36,11 @@
background: $md-color-primary;
color: $md-color-white;
z-index: 1;
// Hide for print
@media print {
display: none;
}
}
// Navigation within header

View File

@ -31,6 +31,11 @@
float: left;
overflow: visible;
// Hide for print
@media print {
display: none;
}
// Lock sidebar to container height (account for fixed header)
&[data-md-locked] {
position: fixed;