Hacker News new | ask | show | jobs
by dna113 2786 days ago
If you prefer that great, which is why I said that I don't think it makes a huge difference one way or another.

.i-dont__find-bem--very-readable.

1 comments

Sass makes it a lot nicer to write BEM notation. The long class names used to bother me too, but it is actually much nicer than not knowing where a class came from. Is `.right-button` a global button style, or unique to this component?
I agree that sass enables nice readable BEM, but I don't really think that BEM makes markup any easier to read than something like tailwind.

If you're into knowing where your class came from, it seems tailwind would be even better for you because now you have access directly to your styles right there in your markup. Skip the class step altogether!

Wouldn’t you know that if the Sass is indented?

I treat my name spacing the way I do in most source code. All the code for a unit is in the same file or in files called out from that file.

If you’re not nesting in Sass you’re missing out on some of the better parts.