> classes are intended for extracting common visual styles
No, they’re intended to group together semantically similar elements. There’s no reason that a blue button and a blue link should be related–what if I want to make the button red later?
No, they’re intended to group together semantically similar elements. There’s no reason that a blue button and a blue link should be related–what if I want to make the button red later?
Having two elements share the same color creates a relation between the two elements. If you have decided to use the same color for both elements it is probably because this color has a specific meaning. If the color of one of the elements changes it is probably a good idea to also change the other element.
I really should write something on forgotten simpler CSS / JavaScript techniques.
Bootstrap does this on some components but it has loads of positional bits and pieces mixed. Also the components are fairly generic.