Skip to content

Comment on CSS Classes Considered Harmful

Comments

So...the problem with css classes is that they are old? I'm not sure I quite understand the why.

Data-attributes on html elements are only for JS behavior in my usage, and CSS classes are for styling.

No, it's because they don't take parameters. Parameters are supported in the tag itself however, might as well use them.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.