Is it possible to use existing css class as content in another class ?
I mean something like:
Contained in some library:
.class1 { text-indent: 100 }
I
CSS has no means to reference one rule-set from another.
Your options include:
Using multiple selectors for things with common rules
.menu,
.nav {
font-weight: bold;
}
.nav {
display: inline-block;
}
Using multiple classes on a single element
.menu {
font-weight: bold;
}
.nav {
display: inline-block;
}
Generating your CSS programatically
For example, with SASS
@mixin menu {
font-weight: bold;
}
.nav {
display: inline-block;
@include menu;
}