DEV Community

Discussion on: 7 CSS Tips To Save Your Sanity

 
lkw23002894 profile image
LKW • Edited

Indeed. Outside-In is reasonable, at least it doesn't interfere with anything that is of no concern.

I was talking specifically classification, i.e. the class attribute. This is what we were given to work around limitations of HTML, when we need to expand on the basic HTML taxonomy. For example we identify that our design has more than one kind of something, we have to assign new names and explain the difference, this is the classification process. Then at scale, users know what classes there are and more importantly, why there are more than one, and understand the rules when to use which class.

So it's BEM that's crazy. We don't want crazy if we care about our sanity. Why would we want to classify all our buttons as 'button'? That has no meaning and it's just extra work. We don't need to classify elements according to their state any more, either, that's certainly something from decades ago. We have attribute selectors for that, aria attributes are really good for that, too.