Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 12, 2018 02:53 pm GMT

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:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks