-
Notifications
You must be signed in to change notification settings - Fork 12.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix print styles for Internet Explorer 11 #1799
Conversation
The freeze is caused by the star selector. Scoping the :first-line and :first-letter selectors to paragraphs seems to be a good compromise. *,
*:before,
*:after,
p:first-line,
p:first-letter {
background: transparent !important;
color: #000 !important;
box-shadow: none !important;
text-shadow: none !important;
} |
@slavanga Good point. From what I've tested it seems that only *,
*:before,
*:after,
*:first-letter,
p:first-line {
background: transparent !important;
color: #000 !important; /* Black prints faster:
http://www.sanbeiji.com/archives/953 */
box-shadow: none !important;
text-shadow: none !important;
} Any other opinions? |
Can someone look up the history of why those first-* lines are in here? Rather unexpected, IMO. |
I found the original pull request: #1715 |
Thanks @slavanga I was able to reproduce this . Annoying issue. It works in Edge. @damianwajer I think expanding from just p:first-child to include maybe |
Did you mean *,
*:before,
*:after,
*:first-letter,
p:first-line,
div:first-line,
blockquote:first-line,
li:first-line {} Like this? It works in IE 11. |
@damianwajer Yeah, that's it. I don't want to add a hundred elements there as it's just a print style and the point of the PR is to fix the freeze. I think those elements are going to cover a majority of the places where people use a |
*:first-line pseudo-selector freezes window with print preview in IE 11 (tested on Windows 7 with IE 11.0.9600.17420 and 11.0.9600.18204, Windows 8.1 with IE 11.0.9600.16663, Windows 10 with IE 11.63.10586.0) To reproduce just open: http://demo.html5boilerplate.com/ or /dist/index.html and select Print > Print preview...
3eea188
to
4d53016
Compare
@roblarsen I see, done. |
Thanks! |
Bootstrap itself doesn't use any `::first-letter` or `::first-line` styles. These selectors also cause(d) problems in IE11 (see h5bp/html5-boilerplate#1799) and currently cause a nasty rendering bug in Chrome where the first letter is vertically shifted (see #21771) As h5bp has now removed these as well, no need to keep and comment them out. See h5bp/html5-boilerplate#1961 / h5bp/html5-boilerplate#1962
*:first-line pseudo-selector freezes window with print preview in IE 11 (tested on Windows 7 with IE 11.0.9600.17420 and 11.0.9600.18204, Windows 8.1 with IE 11.0.9600.16663, Windows 10 with IE 11.63.10586.0) To reproduce just open: http://demo.html5boilerplate.com/ or /dist/index.html and select Print > Print preview...
*:first-line pseudo-selector freezes window with print preview in IE 11 (tested on Windows 7 with IE 11.0.9600.17420 and 11.0.9600.18204, Windows 8.1 with IE 11.0.9600.16663, Windows 10 with IE 11.63.10586.0)
To reproduce just open: http://demo.html5boilerplate.com/ or /dist/index.html and select Print > Print preview...