How much do you really know about media queries?
There are a ton more @media queries than “width” and “prefers-reduced-motion”. Let’s have a long, along with use-cases.
There are a ton more @media queries than “width” and “prefers-reduced-motion”. Let’s have a long, along with use-cases.
There are usually multiple ways to do the same thing on the web. Sometimes… a lot of ways. Which is “better” can be a matter of taste or which abstraction buys the most value. Check out this CSS example and see which you prefer.
Ahmad Shadeed: Today I learned about the media scripting feature. It’s about detecting JS support via a CSS media query. Soon, we won’t need the .no-js or .js classes once this is widely available. Currently supported in Chrome 120, Firefox 119, Safari 17. Tweet
Frontend Masters donates to open source projects through thanks.dev and Open Collective, as well as donates to non-profits like The Last Mile, Annie Canons, and Vets Who Code.