Reputation: 9658
Is there something clever I can do in CSS to indicate that an element with a particular ID should always use one or more classes? Something like:
#user_info_box {
use-class: ui-widget-content ui-corner-all;
position: fixed;
left: 10px;
...
}
Only, you know, using actual valid CSS properties.
Upvotes: 2
Views: 466
Reputation: 3289
Check out http://lesscss.org/
it will give you more flexibility with your CSS including something similar to what you are asking.
Upvotes: 1
Reputation: 47585
You can't do that in CSS, however you may be interested in SASS
#user_info_box {
@extend .ui-widget-content;
@extend .ui-corner-all;
position: fixed;
left: 10px;
...
}
Upvotes: 2
Reputation: 324610
LESS is perfect for this. Specifically, see "mixins".
#user_info_box {
.ui-widget-content;
.ui-corner-all;
position: fixed;
left: 10px;
...
}
Upvotes: 4