How To Combine Multiple Css Class Selectors Into One?
I have a few selector classes eg .rt-grid-6 { ... } .largemargintop { ... } .rt-left { ... } I have to use them in couple of elements in my html sample
Solution 2:
With only CSS
is not possible. You must use a CSS compiler like SASS
or LESS
.
You can see a guide: http://sass-lang.com/guide
An example with SASS
:
.item
{
@extend .rt-grid-6; //refer to the mentioned class@extend .largemargintop;
@extend .rt-left;
}
Very simple!
In SASS
you can use variables, and much more! It's very usefull.
Solution 3:
try using SASS / LESS to overcome this. What you are using won't work
Post a Comment for "How To Combine Multiple Css Class Selectors Into One?"