From 2a302dd3cfe3e080cb16ce983c75b7c4deb4c8d1 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Sat, 13 Feb 2021 16:01:55 +0200 Subject: [PATCH] fix(docs-infra): avoid page-breaks inside an image when printing (#40802) Previously, when printing, a page-break could be inserted inside an image (contained in a `.lightbox` element). This commit ensures no page-breaks are inserted inside `.lightbox` elements (which contain images). Before: ![print-page-break before][1] After: ![print-page-break after][2] [1]: https://user-images.githubusercontent.com/8604205/106939709-48f0e900-6729-11eb-912c-e5cd0cb40897.png [2]: https://user-images.githubusercontent.com/8604205/106939707-48585280-6729-11eb-8d5f-a12312f32056.png PR Close #40802 --- aio/src/styles/_print.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/src/styles/_print.scss b/aio/src/styles/_print.scss index 240ac41e50..3a1fc50810 100644 --- a/aio/src/styles/_print.scss +++ b/aio/src/styles/_print.scss @@ -18,7 +18,7 @@ page-break-after: avoid; } - ul, ol, img, code-example, table, tr, .alert, .feature { + ul, ol, img, code-example, table, tr, .alert, .feature, .lightbox { page-break-inside: avoid; }