Is this a good name for a CSS class?
Šime Vidas
21

In my opinion: not generally! Colors especially should be abstracted out in such a way that they represent the intent of the use of the color — success, failure, alert, help, etc. Putting the literal color name in the CSS class name is an easy way to invalidate your class names when designs change.

An exception to this might be the use of a color that’s purely aesthetic and/or is used sparingly, so it wouldn’t be too painful to change at the source. It’s all about the specific use case.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.