You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
other (Please do not submit support requests here (below))
In version 8 of HTML5Boilerplate, the print styles are inlined using @media print with this comment above:
/* ==========================================================================
Print styles.
Inlined to avoid the additional HTTP request:
https://www.phpied.com/delay-loading-your-print-css/
========================================================================== */
The article, from 2007, does not seem relevant anymore. Many CSS developers are taking advantage of the fact that print-media stylesheets are now loaded asynchronously. (I don't find any specification for this, but it seems to be common practice now, and I see a reference to the async nature of print style sheets at https://developer.mozilla.org/en-US/docs/Learn/Performance/CSS)
So … I think it might be a good idea to separate out the print CSS into a separate file, loaded separately and asynchronously, to allow the main.css file to be a bit smaller, which speeds up initial page load.
The text was updated successfully, but these errors were encountered:
I'm not too sure about this. If the print styles were separate it'd mean a very slight increase in the number of bytes sent over HTTP (as two CSS files compress less than one combined). It also means a very slight increase in the page weight of the HTML on every page of your site (by adding <link rel="stylesheet" href="css/print.css" media="print">).
The print styles CSS in main.css is just 319 bytes (gzipped and minified) - which is tiny, it's easier and quicker to just include them in the main stylesheet.
I'm submitting a ...
In version 8 of HTML5Boilerplate, the print styles are inlined using
@media print
with this comment above:The article, from 2007, does not seem relevant anymore. Many CSS developers are taking advantage of the fact that print-media stylesheets are now loaded asynchronously. (I don't find any specification for this, but it seems to be common practice now, and I see a reference to the async nature of print style sheets at https://developer.mozilla.org/en-US/docs/Learn/Performance/CSS)
So … I think it might be a good idea to separate out the print CSS into a separate file, loaded separately and asynchronously, to allow the main.css file to be a bit smaller, which speeds up initial page load.
The text was updated successfully, but these errors were encountered: