3 ms·
Instead of classes for each color (".red", ".blue", etc) you should use classes which indicate state or function (".primary", ".warning", ".success"). Otherwise
by Smudge 14y ago
Instead of classes for each color (".red", ".blue", etc) you should use classes which indicate state or function (".primary", ".warning", ".success"). Otherwise you might find yourself editing a lot of code just to change the colors of your buttons.
- KaoruAoiShiho 14y agoIncorrect application of best practices.
- Smudge 14y agoCare to elaborate? As I see it, classes named after colors are based on unstable assumptions about presentation. When these assumptions change, you've saved yourself a headache if all you need to change is one line of CSS, instead of every instance of, say, class='button color green' in your markup.