Hacker News new | ask | show | jobs
by 65827 3236 days ago
Unfortunately the idea that you would just restyle the content a bit as needed and viola website is redesigned never really worked. At any point in history. I just wish you could get through a redesign without learning three new languages nowadays.
4 comments

Yes in my experience, we got the worst of both worlds.

We have people with a religion of separating style from content, so they introduce the complexities necessary to do that. But because it is merely a religion, they don't actually do it in a way that makes it possible to actually change styling just through CSS.

Yes, and what's particularly irrational is that CSS found it necessary to invent a new key/value syntax. Then developers wanted to make sense of the mess by declaring "markup is for content, while CSS is for presentation". But the "separation of concerns" argument is merely an after-the-fact justification for the existence of the HTML/CSS separation. In the original markup language concept, attributes were specifically introduced to hold presentation attributes, while content was encoded as element content.

The content/presentation dichotomy doesn't hold water in a philosophical sense either. Many text pieces (such as poems, but also modern text forms) require special presentation. But what was particularly absurd is to invent a new syntax for key/values.

> We have people with a religion of separating style from content, so they introduce the complexities necessary to do that.

Yeah...I've seen lots of code review arguments where one developer refuses to alter the HTML to make the styling easier (e.g. order of elements, wrapping elements in certain ways) and then the CSS styling requires all sorts of complex tricks. If Google or screen readers won't see any difference, striving to separate styling from content like that is a waste of time in my opinion and you should make compromises. People complain about e.g. Bootstrap's "text-center" and column classes as well because they're not semantic but they can save time when used appropriately.

I agree. And if you view HTML as presentation there is absolutely nothing wrong with embedding styles. The CSS separation only makes sense if you consider HTML data, which some people might do but I think is misguided.
Honestly it is never so easy even in LaTeX. There is always some kind of adjustment that needs to be made, because real separation between style and content is really hard to achieve in general.
Check out tachyons and you'll never use anything else again:

http://tachyons.io/