Skip to content

Commit 20821e6

Browse files
committed
Reduce amount of blank pages when printing in Chrome
Close #1196
1 parent 1f4f716 commit 20821e6

File tree

4 files changed

+39
-11
lines changed

4 files changed

+39
-11
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### Bug Fixes
88

99
- Fix license URL in README file. [#1189](https://github.com/mmistakes/minimal-mistakes/pull/1189)
10+
- Reduce amount of blank pages when printing in Chrome. [#1196](https://github.com/mmistakes/minimal-mistakes/issues/1196)
1011

1112
## [4.5.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.5.1)
1213

_sass/minimal-mistakes/_print.scss

+18-5
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,20 @@
1515
}
1616

1717
html {
18-
font-size: 16px;
1918
margin: 0;
2019
padding: 0;
20+
min-height: auto !important;
21+
font-size: 16px;
2122
}
2223

2324
body {
24-
-moz-osx-font-smoothing: grayscale;
25-
-webkit-font-smoothing: antialiased;
25+
margin: 0 auto;
2626
background: #fff !important;
2727
color: #000 !important;
2828
font-size: 1rem;
2929
line-height: 1.5;
30-
margin: 0 auto;
30+
-moz-osx-font-smoothing: grayscale;
31+
-webkit-font-smoothing: antialiased;
3132
text-rendering: optimizeLegibility;
3233
}
3334

@@ -185,6 +186,16 @@
185186
content: " (" attr(title) ")";
186187
}
187188

189+
#main {
190+
max-width: 100%;
191+
}
192+
193+
.page {
194+
margin: 0;
195+
padding: 0;
196+
width: 100%;
197+
}
198+
188199
.page-break,
189200
.page-break-before {
190201
page-break-before: always;
@@ -233,7 +244,9 @@
233244
.author__content,
234245
.author__urls-wrapper,
235246
.nav__list,
247+
.sidebar,
236248
.adsbygoogle {
237249
display: none !important;
250+
height: 1px !important;
238251
}
239-
}
252+
}

docs/_docs/18-history.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ permalink: /docs/history/
44
excerpt: "Change log of enhancements and bug fixes made to the theme."
55
sidebar:
66
nav: docs
7-
last_modified_at: 2017-08-22T14:47:05-04:00
7+
last_modified_at: 2017-08-22T15:32:24-04:00
88
---
99

1010
## Unreleased
@@ -16,6 +16,7 @@ last_modified_at: 2017-08-22T14:47:05-04:00
1616
### Bug Fixes
1717

1818
- Fix license URL in README file. [#1189](https://github.com/mmistakes/minimal-mistakes/pull/1189)
19+
- Reduce amount of blank pages when printing in Chrome. [#1196](https://github.com/mmistakes/minimal-mistakes/issues/1196)
1920

2021
## [4.5.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.5.1)
2122

docs/_sass/minimal-mistakes/_print.scss

+18-5
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,20 @@
1515
}
1616

1717
html {
18-
font-size: 16px;
1918
margin: 0;
2019
padding: 0;
20+
min-height: auto !important;
21+
font-size: 16px;
2122
}
2223

2324
body {
24-
-moz-osx-font-smoothing: grayscale;
25-
-webkit-font-smoothing: antialiased;
25+
margin: 0 auto;
2626
background: #fff !important;
2727
color: #000 !important;
2828
font-size: 1rem;
2929
line-height: 1.5;
30-
margin: 0 auto;
30+
-moz-osx-font-smoothing: grayscale;
31+
-webkit-font-smoothing: antialiased;
3132
text-rendering: optimizeLegibility;
3233
}
3334

@@ -185,6 +186,16 @@
185186
content: " (" attr(title) ")";
186187
}
187188

189+
#main {
190+
max-width: 100%;
191+
}
192+
193+
.page {
194+
margin: 0;
195+
padding: 0;
196+
width: 100%;
197+
}
198+
188199
.page-break,
189200
.page-break-before {
190201
page-break-before: always;
@@ -233,7 +244,9 @@
233244
.author__content,
234245
.author__urls-wrapper,
235246
.nav__list,
247+
.sidebar,
236248
.adsbygoogle {
237249
display: none !important;
250+
height: 1px !important;
238251
}
239-
}
252+
}

0 commit comments

Comments
 (0)