Skip to main content
4 events
when toggle format what by license comment
Jun 20, 2013 at 16:35 comment added Fleshgrinder Sure thing, generic classes to achieve certain effects are more than valid and exactly what I’m utilizing all the time (e.g. the famous clearfix). But as a better example for something that you’ll find in almost every CSS framework, how about stuff like pull-[right|left] respectively float-[right|left]? They are absolutely equal to applying style="float:[right|left]" to an element. The whole thing is only a valid concern if you only apply a single class to an element (as in my question).
Jun 20, 2013 at 13:49 comment added Jukka K. Korpela Changing the styling to something completely different would surely be a bigger problem when you have the same CSS code in several style attributes. You would have to compare this with the issue of making the class name misleading. And you don't need to use a name like text-center. It could also be foobar, or some descriptive ("semantic") name, if the elements share some structural or semantic feature.
Jun 20, 2013 at 13:19 comment added Fleshgrinder You’d end up with a class that’s not doing what she’s telling you. Additionally if you’d want to change it you’d have to start with shotgun surgery, because you’d have to change the class names on absolutely all elements. The joke is, you have to do the same if you don’t want all your centered texts not centered anymore. Thanks for your input.
Jun 20, 2013 at 12:43 history answered Jukka K. Korpela CC BY-SA 3.0