csswizardry / inuit.css

Powerful, scalable, Sass-based, BEM, OOCSS framework.
inuitcss.com
Other
3.83k stars 415 forks source link

silent classes #38

Closed PavelDemyanenko closed 11 years ago

PavelDemyanenko commented 11 years ago

Hi, how about rewritting code in this direction? https://speakerdeck.com/u/anotheruiguy/p/sass-32-silent-classes

csswizardry commented 11 years ago

I don’t really agree with that methodology on the whole; it will still lead to bloated CSS (more so than OOCSS) because your abstractions have become 1:1 with your HTML. A class like .media can be applied to many different types of markup but if we were to use silent classes then we’d need to pick a new, unique name for every occurrence of what would previously have just been .media.

If you take a look at my talk Big CSS from this point onward (and slide 25 in particular) you can see how using the same class over and over means it can be applied to many different things without necessarily needing a second ‘semantic’ class.

There might be scope for invisible classes, sure, and I shall cross those bridges when I come to them, but for now classes reused in the HTML are more flexible than having to constantly assign new names to them in the CSS…

Cheers for all your feedback!

H

PavelDemyanenko commented 11 years ago

Ok, thanks ;)