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.




