Hacker News new | past | comments | ask | show | jobs | submit login

  When writing your code simply assign the "sg-" class to
  your box elements.
That's why I don't like CSS frameworks: they throw the very idea of separation of content from presentation out of the window :(



Could you explain how you think adding a class violates the separation of content and presentation?

Unless you're building a completely unstyled site, you'll be adding classes and ids anyway, so what makes using predefined ones wrong?


I'm not the OP but I think it is because the class names being used are not semantic in terms of the content. Instead they contain information about the layout of the page.

This makes certain types of change messier. For instance, if I have some CSS class called `quotation` that is used in various pages of my site, I can change the style of those divs or whatever in one edit of a single CSS file. However, if instead those elements all have the class name `sg-5` and I want to change them all to be `sg-7`, I must go and edit every page that contains instances of said element. And, speaking from personal experience, I will probably make a mistake or miss some cases when doing so.


I appreciate the sentiment, but this doesn't seem as big of a deal now. You can have a semantically structured page, then using jQuery or more advanced CSS selectors cherry pick elements and assign classes without touching the html.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: