Hacker News new | ask | show | jobs
by SquareWheel 3684 days ago
I read that post earlier and it seemed fine. If you add a .bold class to an element, why would you want it to sometimes not be bold?

Utility classes don't belong everywhere but I think it's going a bit far to discredit the man for proposing this. His work on ITCSS in particular shows he's well versed in the language. I find this system far more sane than other proposals.

2 comments

Why bother with class 'bold' when you could use inline styles? (I jest)

I come from an older thinking that your HTML should not have any classes that imply visual style, and that classes/id's should be semantic to the content and structure of the HTML.

CSSZen garden is a good example of this.

Nowadays I personally love semantic markup, stylistic mixins, and a CSS file linking the two together following BEM patterns.

I think legitimate times when this falls apart, is when I watch the designers I work with now, work in HTML & CSS - they need to quickly move things around, so doing this all from markup gives them a big speed increase, up until a point that is. We get involved now early after initial client direction sign-off to make their markup and CSS more robust before they carry on like a pig in poo.

> If you add a .bold class to an element, why would you want it to sometimes not be bold?

The problem is having a class called .bold, and then baking it into your HTML. I feel like many people arguing this have never undertaken a full-scale visual redesign on a large site. The designer comes in, and all the sudden everything marked .bold ends up meaning "lightweight italicized text". This presentational/semantic cycle repeats every 6 years or so, but I'm not sure where it's heading.