You can’t just do @media (prefers-reduced-data: no-preference) alone because, as Kilian Valkhof says:
[…] that would be false if either there was no support (since the browser wouldn’t understand the media query) or if it was supported but the
…
The post Detecting Media Query Support in CSS and JavaScript appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
https://kilianvalkhof.com/2021/web/detecting-media-query-support-in-css-and-javascript/
Accedi per aggiungere un commento
Altri post in questo gruppo
Adam’s such a mad scientist with CSS. He’s been putting together a series of “notebooks” that make it easy
We’ve been able to get the length of the viewport in CSS since… checks notes…
Stationery Pad is a handy way to nix a step in your workflow if you regularly use document templates on your Mac. The long-standing Finder feature essentially tells a file’s parent application to o
I enjoy organizing code and find cascade layers a fantastic way to organize code explicitly as the cascade looks at it. The neat part is, that as much as it helps with "top-level" organization, cas
A little gem from Kevin Powell's "HTML & CSS Tip of the Week" website, reminding us that using container queries opens up container query units for sizing things based on the size of the queried co
Are partials the only thing keeping you writing CSS in Sass? With a little configuration, it's possible to compile partial CSS files without a Sass dependency. Ryan Trimble has the details.
<hr