An Interest In:
Web News this Week
- May 1, 2024
- April 30, 2024
- April 29, 2024
- April 28, 2024
- April 27, 2024
- April 26, 2024
- April 25, 2024
November 12, 2018 02:53 pm GMT
Original Link: https://blog.tomayac.com/2018/11/08/why-browsers-download-stylesheets-with-non-matching-media-queries-180513
Why Browsers Download Stylesheets with Non-Matching Media Queries
Say you have a stylesheet linked up like this:
<link href="mobile.css" rel="stylesheet" media="screen and (max-width: 600px)">
But as the page loads, you're on a desktop browser where the screen is 1753px wide. The browser should just skip loading that stylesheet entirely, right? It doesn't. Thomas Steiner explains:
it turns out that the CSS spec writers and browser implementors are actually pretty darn smart about this:
The thing is, the user could always decide to resize their window (impacting width, height, …
The post Why Browsers Download Stylesheets with Non-Matching Media Queries appeared first on CSS-Tricks.
Original Link: https://blog.tomayac.com/2018/11/08/why-browsers-download-stylesheets-with-non-matching-media-queries-180513
Share this article:
Tweet
View Full Article