Refactoring legacy CSS without breaking everything — follow-up -
RetroRex - 12-02-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.
I design in the browser almost exclusively now; mockups only for client sign-off.
-
VinylVera - 12-02-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.
Good point, I had not thought of it that way.
-
GamerGhoul - 12-02-2026
CSS variables + one class toggle is my whole dark mode stack.
Interesting — I will have to try that.
-
BinaryBen - 12-02-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.
Nice thread, following for the replies.
-
PixelatedPaul - 12-02-2026
I still reach for Bootstrap when a client needs to maintain it afterwards.
-
GamerGhoul - 12-02-2026
(Yesterday, 07:18 PM)PixelatedPaul Wrote: I still reach for Bootstrap when a client needs to maintain it afterwards.
:has() feels like cheating compared to what we used to do.
Thanks for sharing, saved me a lot of time.
Interesting — I will have to try that.
-
BinaryBen - 12-02-2026
:has() feels like cheating compared to what we used to do.
I still reach for Bootstrap when a client needs to maintain it afterwards.
Good point, I had not thought of it that way.
-
GamerGhoul - 12-02-2026
Refactoring legacy CSS one component at a time is the only sane way.
That has been my experience as well.