-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsheets-of-paper.css
More file actions
106 lines (100 loc) · 3.32 KB
/
sheets-of-paper.css
File metadata and controls
106 lines (100 loc) · 3.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/*!
* HTML-Sheets-of-Paper (https://github.com/delight-im/HTML-Sheets-of-Paper)
* Copyright (c) delight.im (https://www.delight.im/)
* Licensed under the MIT License (https://opensource.org/licenses/MIT)
*/
html, body {
/* Reset the document's margin values */
margin: 0;
/* Reset the document's padding values */
padding: 0;
/* Use the platform's native font as the default */
font-family: "Roboto", -apple-system, "San Francisco", "Segoe UI", "Helvetica Neue", sans-serif;
/* Define a reasonable base font size */
font-size: 12pt;
/* Styles for better appearance on screens only -- are reset to defaults in print styles later */
/* Use a non-white background color to make the content areas stick out from the full page box */
background-color: #eee;
}
/* Styles that are shared by all elements */
* {
/* Include the content box as well as padding and border for precise definitions */
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.page {
/* Styles for better appearance on screens only -- are reset to defaults in print styles later */
/* Divide single pages with some space and center all pages horizontally */
margin: 1cm auto;
/* Define a white paper background that sticks out from the darker overall background */
background: #fff;
/* Show a drop shadow beneath each page */
box-shadow: 0 4px 5px rgba(75, 75, 75, 0.2);
/* Override outline from user agent stylesheets */
outline: 0;
}
/* Defines a class for manual page breaks via inserted .page-break element */
div.page-break {
page-break-after: always;
}
/* For top-level headings only */
h1 {
/* Force page breaks after */
page-break-before: always;
}
/* For all headings */
h1, h2, h3, h4, h5, h6 {
/* Avoid page breaks immediately */
page-break-after: avoid;
}
/* For all paragraph tags */
p {
/* Reset the margin so that the text starts and ends at the expected marks */
margin: 0;
}
/* For adjacent paragraph tags */
p + p {
/* Restore the spacing between the paragraphs */
margin-top: 0.5cm;
}
/* For links in the document */
a {
/* Prevent colorization or decoration */
text-decoration: none;
color: black;
}
/* For tables in the document */
table {
/* Avoid page breaks inside */
page-break-inside: avoid;
}
/* Use CSS Paged Media to switch from continuous documents to sheet-like documents with separate pages */
@page {
/* You can only change the size, margins, orphans, widows and page breaks here */
/* Require that at least this many lines of a paragraph must be left at the bottom of a page */
orphans: 4;
/* Require that at least this many lines of a paragraph must be left at the top of a new page */
widows: 2;
}
/* When the document is actually printed */
@media print {
html, body {
/* Reset the document's background color */
background-color: #fff;
}
.page {
/* Reset all page styles that have been for better screen appearance only */
/* Break cascading by using the !important rule */
/* These resets are absolute must-haves for the print styles and the specificity may be higher elsewhere */
width: initial !important;
min-height: initial !important;
margin: 0 !important;
padding: 0 !important;
border: initial !important;
border-radius: initial !important;
background: initial !important;
box-shadow: initial !important;
/* Force page breaks after each .page element of the document */
page-break-after: always;
}
}