Reputation: 185
Is it possible to group a bunch of classes into one for example:
<button id="buttonCalculate" class="ui-btn ui-mini my-btn">Calculate</button>
It would be nice to group "ui-btn ui-mini my-btn" into a single class
Thanks
Upvotes: 1
Views: 1247
Reputation: 550
You can chain css if you want to apply properties to this element when all three classes are present.
.ui-btn.ui-mini.my-btn { }
Upvotes: 0
Reputation: 73
Yes you can using CSS Mixins
Try reading this http://wynnnetherland.com/journal/css-mixins-vs-multiple-classes
Upvotes: 1
Reputation: 15860
Yes, you can group multiple classes in a single statement!
Like the one you're having!
<button id="buttonCalculate" class="ui-btn ui-mini my-btn">Calculate</button>
This is OK! And all the classes would be applied to it.
Upvotes: 0