他のCSSクラスへの参照であるクラスを定義することは可能ですか?Cssクラス値の置換
例
あるmain.css
// this is just a pseudo code for the lack of the proper command if it exists
.a {
#ref: '.b, .c'
}
plugin.css
.b {
color: red;
}
.c {
font-size: 1em;
}
index.htmlを輸入あるmain.cssとplugin.css
<div class="a">Hello</div> <!-- a should be substituted or resolved to .b and .c -->
ええ、OPに、私はこれがあなたが探しているものだと思います。個人的には、可変構文が最も簡単なので、私はLESSを好む。 '@変数 'を宣言し、それを後の値として呼び出すことができます。例: '@color:#555;'> '.class {background-color:@color;' – Jesse
ありがとうございました – artemisian