News for hackers. Stuff that matters.
Re:Modern CSS Code Snippets: Stop writing CSS like it's 2015 by easyThrowaway on Monday February 16, 2026 @02:47PM (#47039380)
CSS Zen Garden is quite the opposite of a good example of your point. Even small changes to the original page layout would completely break most of the provided styles.

If I removed the .page-wrapper class it would be also nearly impossible for a different developer to reverse-engineer the issue from the existing Template and CSS files.

Re:Modern CSS Code Snippets: Stop writing CSS like it's 2015 by shimman on Monday February 16, 2026 @10:23PM (#47043351)
Yes, if you remove CSS it does tend to break the CSS.
Re:Modern CSS Code Snippets: Stop writing CSS like it's 2015 by easyThrowaway on Tuesday February 17, 2026 @05:31AM (#47045824)
The point isn't simply "class removal affects cascading", but "anything upstream is capable of placing the original content in an unrecoverable state".

Where "anything" could be your framework, your CMS, you or your coworkers a few years after the original CSS has been written and you can't fully remember what ".format-header__nav-wrapper:not(:last-child) .model-header__nav-wrapper:not(:last-child)" is doing.

And yes, that's a real CSS selector from a refactoring job I'm doing right now.