diff --git a/scss/_print.scss b/scss/_print.scss index 6505d3e947de..5e2ce3a8aafc 100644 --- a/scss/_print.scss +++ b/scss/_print.scss @@ -20,9 +20,10 @@ box-shadow: none !important; } - a, - a:visited { - text-decoration: underline; + a { + &:not(.btn) { + text-decoration: underline; + } } // Bootstrap specific; comment the following selector out @@ -82,6 +83,19 @@ // Bootstrap specific changes start + // Specify a size and min-width to make printing closer across browsers. + // We don't set margin here because it breaks `size` in Chrome. We also + // don't use `!important` on `size` as it breaks in Chrome. + @page { + size: $print-page-size; + } + body { + min-width: $print-body-min-width !important; + } + .container { + min-width: $print-body-min-width !important; + } + // Bootstrap components .navbar { display: none; diff --git a/scss/_variables.scss b/scss/_variables.scss index 1d4f44b96c21..9472a67275bf 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -880,3 +880,8 @@ $kbd-bg: $gray-900 !default; $pre-color: $gray-900 !default; $pre-scrollable-max-height: 340px !default; + + +// Printing +$print-page-size: a3 !default; +$print-body-min-width: map-get($grid-breakpoints, "lg") !default;