MyStudio Free demo
CSS :has() use cases you actually use — follow-up - Printable Version

+- MyStudio Free demo (https://demo.mystudio.forumeze.com)
+-- Forum: Webmaster (https://demo.mystudio.forumeze.com/forum-15.html)
+--- Forum: Design & Development (https://demo.mystudio.forumeze.com/forum-17.html)
+--- Thread: CSS :has() use cases you actually use — follow-up (/thread-250.html)



CSS :has() use cases you actually use — follow-up - KernelKate - 10-16-2026

Dark mode is a one-liner media query once your colours live in variables.

Code:
:root { --accent: #4f7cff; }
— CSS variables made my theming life so much easier.

Container queries changed how I build card layouts — the component adapts to its slot, not the viewport.


- WidgetWill - 10-16-2026

Container queries are great but I still add a media-query fallback.

I still reach for Bootstrap when a client needs to maintain it afterwards.


- SpammySteve - 10-18-2026

(10-16-2026, 04:43 PM)WidgetWill Wrote: Container queries are great but I still add a media-query fallback.
Container queries are great but I still add a media-query fallback.

Refactoring legacy CSS one component at a time is the only sane way.

Good point, I had not thought of it that way.


- BinaryBen - 10-18-2026

I still reach for Bootstrap when a client needs to maintain it afterwards.

CSS variables + one class toggle is my whole dark mode stack.


- TechTress - 10-18-2026

Container queries are great but I still add a media-query fallback.

Nice thread, following for the replies.