Nested Media Queries

We don’t have “regular” nesting in CSS. Maybe this becomes a thing someday, or something like it. That would be cool, although that pre-spec doesn’t mention anything about media queries. I’d hope we get that right out of the gate …

The post Nested Media Queries appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://www.bram.us/2021/01/11/nested-media-queries/

Created 4y | Feb 9, 2021, 10:20:42 PM


Login to add comment

Other posts in this group

Organizing Design System Component Patterns With CSS Cascade Layers

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

Feb 10, 2025, 2:40:07 PM | CSS tricks
Container query units: cqi and cqb

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

Feb 6, 2025, 3:40:06 PM | CSS tricks
Baseline Status in a WordPress Block

The steps for how I took the Baseline Status web component and made it into a WordPress block that can be used on any page of post.


Feb 5, 2025, 4:30:08 PM | CSS tricks
Compiling CSS With Vite and Lightning CSS

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

Feb 3, 2025, 3:40:18 PM | CSS tricks
Keeping the page interactive while a View Transition is running

When using View Transitions you’ll notice the page becomes unresponsive to clicks while a View Transition is running

Jan 31, 2025, 8:30:06 PM | CSS tricks
Chrome 133 Goodies

Did you see the release notes for Chrome 133? It's currently in beta, but the Chrome team has been publishing a slew of new articles with pretty incredible demos that are tough to ignore. I figured

Jan 31, 2025, 3:50:08 PM | CSS tricks
The Mistakes of CSS

All of the things that the CSS Working Group would change if they had a time-traveling Delorean to go back and do things over.


Jan 30, 2025, 4:40:05 PM | CSS tricks