diff --git a/CHANGELOG.md b/CHANGELOG.md index 03ae0915..23fd7286 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Bug Fixes - Fix license URL in README file. [#1189](https://github.com/mmistakes/minimal-mistakes/pull/1189) +- Reduce amount of blank pages when printing in Chrome. [#1196](https://github.com/mmistakes/minimal-mistakes/issues/1196) ## [4.5.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.5.1) diff --git a/_sass/minimal-mistakes/_print.scss b/_sass/minimal-mistakes/_print.scss index 468dd0fc..b93f1d40 100644 --- a/_sass/minimal-mistakes/_print.scss +++ b/_sass/minimal-mistakes/_print.scss @@ -15,19 +15,20 @@ } html { - font-size: 16px; margin: 0; padding: 0; + min-height: auto !important; + font-size: 16px; } body { - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; + margin: 0 auto; background: #fff !important; color: #000 !important; font-size: 1rem; line-height: 1.5; - margin: 0 auto; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; } @@ -185,6 +186,16 @@ content: " (" attr(title) ")"; } + #main { + max-width: 100%; + } + + .page { + margin: 0; + padding: 0; + width: 100%; + } + .page-break, .page-break-before { page-break-before: always; @@ -233,7 +244,9 @@ .author__content, .author__urls-wrapper, .nav__list, + .sidebar, .adsbygoogle { display: none !important; + height: 1px !important; } -} +} \ No newline at end of file diff --git a/docs/_docs/18-history.md b/docs/_docs/18-history.md index 2ea8c7e2..26396289 100644 --- a/docs/_docs/18-history.md +++ b/docs/_docs/18-history.md @@ -4,7 +4,7 @@ permalink: /docs/history/ excerpt: "Change log of enhancements and bug fixes made to the theme." sidebar: nav: docs -last_modified_at: 2017-08-22T14:47:05-04:00 +last_modified_at: 2017-08-22T15:32:24-04:00 --- ## Unreleased @@ -16,6 +16,7 @@ last_modified_at: 2017-08-22T14:47:05-04:00 ### Bug Fixes - Fix license URL in README file. [#1189](https://github.com/mmistakes/minimal-mistakes/pull/1189) +- Reduce amount of blank pages when printing in Chrome. [#1196](https://github.com/mmistakes/minimal-mistakes/issues/1196) ## [4.5.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.5.1) diff --git a/docs/_sass/minimal-mistakes/_print.scss b/docs/_sass/minimal-mistakes/_print.scss index 468dd0fc..b93f1d40 100644 --- a/docs/_sass/minimal-mistakes/_print.scss +++ b/docs/_sass/minimal-mistakes/_print.scss @@ -15,19 +15,20 @@ } html { - font-size: 16px; margin: 0; padding: 0; + min-height: auto !important; + font-size: 16px; } body { - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; + margin: 0 auto; background: #fff !important; color: #000 !important; font-size: 1rem; line-height: 1.5; - margin: 0 auto; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; } @@ -185,6 +186,16 @@ content: " (" attr(title) ")"; } + #main { + max-width: 100%; + } + + .page { + margin: 0; + padding: 0; + width: 100%; + } + .page-break, .page-break-before { page-break-before: always; @@ -233,7 +244,9 @@ .author__content, .author__urls-wrapper, .nav__list, + .sidebar, .adsbygoogle { display: none !important; + height: 1px !important; } -} +} \ No newline at end of file