From 7410be08c17d2afd3ebf75d8c0b77fe62d2c5810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eirik=20Vesterkj=C3=A6r?= Date: Wed, 28 Nov 2018 20:12:48 +0100 Subject: [PATCH 1/4] @media print changes - printing now keeps format Printed page looks like the html is displayed, including code highlighting, blockquotes, and LaTeX --- markdown.css | 83 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 33 deletions(-) diff --git a/markdown.css b/markdown.css index 54eb1a0..28e7992 100644 --- a/markdown.css +++ b/markdown.css @@ -224,75 +224,92 @@ td { @media print { * { - background: transparent !important; - color: black !important; - filter: none !important; - -ms-filter: none !important; + filter: none !important; + -ms-filter: none !important; } body { - font-size: 12pt; + color: #444; max-width: 100%; - } + font-family: Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman', serif; + font-size: 12pt; + line-height:1.5; + padding: 1em; + margin: auto; + background: #fefefe; + } - a, + a, a:visited { text-decoration: underline; - } + } hr { height: 1px; border: 0; border-bottom: 1px solid black; - } + } a[href]:after { content: " (" attr(href) ")"; - } + } abbr[title]:after { content: " (" attr(title) ")"; - } + } - .ir a:after, - a[href^="javascript:"]:after, + .ir a:after, + a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; - } + } + + pre, code, kbd, samp { + color: #001; + font-family: monospace, monospace; + _font-family: 'courier new', monospace; + } + + pre { + background: #fdfaf5; + font-size: 11pt; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; + padding-left: 0.5em; + padding-right: 0.5em; + } - pre, blockquote { - border: 1px solid #999; - padding-right: 1em; - page-break-inside: avoid; - } + color: #666666; + margin: 0; + padding-left: 3em; + border-left: 0.5em #EEE solid; + } - tr, - img { + tr, img { page-break-inside: avoid; - } + } img { max-width: 100% !important; - } + } @page :left { margin: 15mm 20mm 15mm 10mm; - } + } @page :right { margin: 15mm 10mm 15mm 20mm; - } + } - p, - h2, - h3 { + p, h2, h3 { orphans: 3; widows: 3; - } + } - h2, - h3 { + h3, h2 { page-break-after: avoid; - } -} + } + +} \ No newline at end of file From a14c23f8403ee7653f9868846d2daec6e8e03b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eirik=20Vesterkj=C3=A6r?= Date: Wed, 28 Nov 2018 20:20:19 +0100 Subject: [PATCH 2/4] Remove trailing whitespace --- markdown.css | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/markdown.css b/markdown.css index 28e7992..b4856c5 100644 --- a/markdown.css +++ b/markdown.css @@ -237,38 +237,38 @@ td { padding: 1em; margin: auto; background: #fefefe; - } + } - a, + a, a:visited { text-decoration: underline; - } + } hr { height: 1px; border: 0; border-bottom: 1px solid black; - } + } a[href]:after { content: " (" attr(href) ")"; - } + } abbr[title]:after { content: " (" attr(title) ")"; - } + } .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; - } + } pre, code, kbd, samp { color: #001; font-family: monospace, monospace; _font-family: 'courier new', monospace; - } + } pre { background: #fdfaf5; @@ -278,38 +278,40 @@ td { word-wrap: break-word; padding-left: 0.5em; padding-right: 0.5em; - } + } blockquote { color: #666666; margin: 0; padding-left: 3em; border-left: 0.5em #EEE solid; - } + } tr, img { page-break-inside: avoid; - } + } img { max-width: 100% !important; - } + } @page :left { margin: 15mm 20mm 15mm 10mm; - } + } @page :right { margin: 15mm 10mm 15mm 20mm; - } + } - p, h2, h3 { + p, + h2, + h3 { orphans: 3; widows: 3; - } + } h3, h2 { page-break-after: avoid; - } + } } \ No newline at end of file From 211647c5bd317e390f9c6b89672837c908e4e8d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eirik=20Vesterkj=C3=A6r?= Date: Wed, 28 Nov 2018 20:21:31 +0100 Subject: [PATCH 3/4] Code formatting --- markdown.css | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/markdown.css b/markdown.css index b4856c5..af02350 100644 --- a/markdown.css +++ b/markdown.css @@ -287,7 +287,8 @@ td { border-left: 0.5em #EEE solid; } - tr, img { + tr, + img { page-break-inside: avoid; } @@ -310,7 +311,8 @@ td { widows: 3; } - h3, h2 { + h3, + h2 { page-break-after: avoid; } From 6a269a323fda33ba9f40efa2fe0d8ee837885852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eirik=20Vesterkj=C3=A6r?= Date: Wed, 28 Nov 2018 20:23:52 +0100 Subject: [PATCH 4/4] Tiny code formatting change --- markdown.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/markdown.css b/markdown.css index af02350..4943b5b 100644 --- a/markdown.css +++ b/markdown.css @@ -264,7 +264,10 @@ td { content: ""; } - pre, code, kbd, samp { + pre, + code, + kbd, + samp { color: #001; font-family: monospace, monospace; _font-family: 'courier new', monospace;