Home › Forums › CSS › Why use .btn and .btn-primary rather than button and button.primary? › Reply To: Why use .btn and .btn-primary rather than button and button.primary?
March 7, 2016 at 11:24 am
#238802
Senff
Participant
The only reasons I can come up with are, for instance, to allow developers to use .btn classes on links
That’s pretty much the main reason; in some cases, other tags are supposed to look like buttons and then you can easily style them by applying the class “btn”. Not just for A HREF links, but definitely also for INPUTs of type “button”.
By having a generic class “btn” (instead of just having them on BUTTONS) keeps your options open.