Skip to content

Commit ac18104

Browse files
committed
Reduce blank pages when printing in Chrome
Close #29
1 parent 4e715da commit ac18104

File tree

3 files changed

+281
-224
lines changed

3 files changed

+281
-224
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## Unreleased
9+
10+
### Fixed
11+
- `/_sass/_print.scss` to reduce blank pages when printing in Chrome. [#29](https://github.com/mmistakes/jekyll-theme-basically-basic/issues/29)
12+
813
## [1.1.1] - 2017-09-06
914
### Changed
1015
- Change `gems` key in `_config.yml` to `plugins`. [#23](https://github.com/mmistakes/jekyll-theme-basically-basic/pull/23)

_sass/basically-basic/_print.scss

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,20 @@
1717
html {
1818
margin: 0;
1919
padding: 0;
20+
height: auto;
21+
min-height: auto !important;
2022
font-size: 16px;
2123
}
2224

2325
body {
24-
margin: 0 auto;
26+
margin: 0;
27+
height: auto;
2528
background: #fff !important;
2629
color: #000 !important;
2730
font-size: 1rem;
31+
line-height: 1.5;
2832
-moz-osx-font-smoothing: grayscale;
2933
-webkit-font-smoothing: antialiased;
30-
line-height: 1.5;
3134
text-rendering: optimizeLegibility;
3235
}
3336

@@ -185,6 +188,26 @@
185188
content: ' (' attr(title) ')';
186189
}
187190

191+
.wrapper {
192+
min-height: auto !important;
193+
}
194+
195+
#main {
196+
max-width: 100%;
197+
}
198+
199+
.inner {
200+
margin: 0;
201+
padding: 0;
202+
width: 100%;
203+
max-width: 100%;
204+
}
205+
206+
.intro-actions .btn {
207+
color: #fff;
208+
background: #000;
209+
}
210+
188211
.page-break,
189212
.page-break-before {
190213
page-break-before: always;
@@ -216,11 +239,14 @@
216239
Hide the following elements on print
217240
========================================================================== */
218241

242+
.skip-links,
219243
.sidebar-toggle-wrapper,
244+
.sidebar,
220245
.title-area,
221246
.pager,
222247
.site-footer,
223248
.adsbygoogle {
224249
display: none !important;
250+
height: 1px;
225251
}
226252
}

0 commit comments

Comments
 (0)