DEV Community

Discussion on: Ssstyles - a classless stylsheet

Collapse
 
moopet profile image
Ben Sinclair

I think I like this, but I'm not sold.

I like the idea of having a base stylesheet which doesn't use classes, because every time I see someone write something like <div class="nav"> a little piece of my soul departs.

On the other hand, what you're doing is using data attributes instead of classes, which isn't functionally any different, is it?

Collapse
 
iamschulz profile image
Daniel Schulz

I split this up into two parts. The classless stylesheet, base.css, doesn't use data attributes and should work with about every HTML document.
I added some more, optional UI components that can be used with data-attributes. Those are available in the complete all.css or with npm. You're right, those data attributes are not functionally different from class names.