You’ll be able to’t simply do @media (prefers-reduced-data: no-preference) alone as a result of, as Kilian Valkhof says:
[…] that will be false if both there was no assist (for the reason that browser wouldn’t perceive the media question) or if it was supported however the consumer needed to protect knowledge.Often @helps is the software for this in CSS, however that doesn’t work with @media queries. Seems there’s a answer although:
@media not all and (prefers-reduced-data), (prefers-reduced-data) {
/* … */
}
It is a considerably advanced logic puzzle involving media question syntax and the way browsers consider these items. It’s good you’ll be able to in the end deal with a no-support fallback scenario in a single expression.
Direct Hyperlink to Article — Permalink
The submit Detecting Media Question Help in CSS and JavaScript appeared first on CSS-Tips. You’ll be able to assist CSS-Tips by being an MVP Supporter.
0
Subscribe to MarketingSolution.
Receive web development discounts & web design tutorials.
Now! Lets GROW Together!