Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Did anyone ever do a good post-action write-up of how if you actually use the CSS Zen Garden technique for something which isn't a fixed target for demoing the power of CSS and the creativity of those who wield it, you end up with both HTML and CSS everyone is afraid to touch?

When multiple different CSS layouts depend _deeply_ on the specific structure of the markup and the markup _needs_ to change over time, at the least you're in for pain, and at the most you're hosed/rewriting.



I disagree. Most websites are a "fixed target". Creating markup that clearly reflects this and then styling that isn't hard.

Maintaining CSS is easier than picking through markup trying to catch all the class names, especially if you use a preprocessor with nesting.

Admittedly in my professional experience, CSS-only refreshes are rare, but in my case only because it's been more common to change the content at the same time.


The structure of the markup is dependent on the semantic structure of the content that is marked up. The CSS is styling that structure.

The markup shouldn't need to change over time in a way that makes the CSS layouts not work because it just reflects the semantic structure of the document, which shouldn't really need to change. If it does you have quite a different document and so of course it will need CSS changes too.

I was always much more afraid of touching ad-hoc CSS that was written alongside HTML, because it ends up having all these classes and elements that have no semantics and it becomes very unclear what anything actually means. The very worst is the "tailwind" styling where classes etc mean nothing, just styling.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: