From e0e417f955709bb7752fc036e611a287e05a4fd9 Mon Sep 17 00:00:00 2001 From: "Patrick H. Lauke" Date: Tue, 11 Jul 2017 10:56:16 +0100 Subject: [PATCH 1/2] Remove ::first-letter and ::first-line selectors from print styles Bootstrap itself doesn't use any `::first-letter` or `::first-line` styles. These selectors also cause(d) problems in IE11 (see https://github.com/h5bp/html5-boilerplate/pull/1799) and currently cause a nasty rendering bug in Chrome where the first letter is vertically shifted (see https://github.com/twbs/bootstrap/issues/21771) --- scss/_print.scss | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/scss/_print.scss b/scss/_print.scss index e20219a38bd7..9e45ca3abdee 100644 --- a/scss/_print.scss +++ b/scss/_print.scss @@ -12,15 +12,20 @@ @media print { *, *::before, - *::after, - p::first-letter, - div::first-letter, - blockquote::first-letter, - li::first-letter, - p::first-line, - div::first-line, - blockquote::first-line, - li::first-line { + *::after { + // Bootstrap specific; comment the following selectors out + // as we don't set any shadow on first line/letter in Bootstrap + // and these selectors trigger a nasty rendering bug in current Chrome + // https://bugs.chromium.org/p/chromium/issues/detail?id=739800 + // p::first-letter, + // div::first-letter, + // blockquote::first-letter, + // li::first-letter, + // p::first-line, + // div::first-line, + // blockquote::first-line, + // li::first-line + // Bootstrap specific; comment out `color` and `background` //color: #000 !important; // Black prints faster: // http://www.sanbeiji.com/archives/953 From 20364a4a9ce5317fcd85dc744d60324e02023f93 Mon Sep 17 00:00:00 2001 From: "Patrick H. Lauke" Date: Tue, 11 Jul 2017 19:45:34 +0100 Subject: [PATCH 2/2] Remove, rather than comment out, ::first-line/::first-letter As h5bp has now removed these as well, no need to keep and comment them out. See https://github.com/h5bp/html5-boilerplate/issues/1961 / https://github.com/h5bp/html5-boilerplate/pull/1962 --- scss/_print.scss | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/scss/_print.scss b/scss/_print.scss index 9e45ca3abdee..7f8d9900a315 100644 --- a/scss/_print.scss +++ b/scss/_print.scss @@ -13,19 +13,6 @@ *, *::before, *::after { - // Bootstrap specific; comment the following selectors out - // as we don't set any shadow on first line/letter in Bootstrap - // and these selectors trigger a nasty rendering bug in current Chrome - // https://bugs.chromium.org/p/chromium/issues/detail?id=739800 - // p::first-letter, - // div::first-letter, - // blockquote::first-letter, - // li::first-letter, - // p::first-line, - // div::first-line, - // blockquote::first-line, - // li::first-line - // Bootstrap specific; comment out `color` and `background` //color: #000 !important; // Black prints faster: // http://www.sanbeiji.com/archives/953