更少的css-我们可以使用更多与coma分离的变量吗
像这样更少的css-我们可以使用更多与coma分离的变量吗,css,variables,less,Css,Variables,Less,像这样 @ShuttleGrey: #606369; 我需要从更多变量中获得相同的输出颜色值[我正在寻找单线解决方案] @themeOne:, @themeTwo:, @themeThree: @ShuttleGrey; 我知道我的代码是错误的,有人知道如何修复这种情况吗 谢谢假设您希望在许多地方应用相同的属性,您可以这样做 .aProperty{ color:#606369 } 然后,您可以这样做,将相同的属性添加到其他元素中 .anotherPrope
@ShuttleGrey: #606369;
我需要从更多变量中获得相同的输出颜色值[我正在寻找单线解决方案]
@themeOne:, @themeTwo:, @themeThree: @ShuttleGrey;
我知道我的代码是错误的,有人知道如何修复这种情况吗
谢谢假设您希望在许多地方应用相同的属性,您可以这样做
.aProperty{
color:#606369
}
然后,您可以这样做,将相同的属性添加到其他元素中
.anotherProperty{
background:#000; //just like that
.aProperty;
}
.anotherProperty{
background:#000; //just like that
.aProperty;
}
这样。另一个属性
将继承属性
这样,您甚至可以添加其他属性并在许多地方使用它们
.aProperty{
color:#606369
}
然后,您可以这样做,将相同的属性添加到其他元素中
.anotherProperty{
background:#000; //just like that
.aProperty;
}
.anotherProperty{
background:#000; //just like that
.aProperty;
}
由于没有答案被接受,我正在尝试我的运气:)研究这个问题:你需要对许多组件应用相同的颜色值吗?@Shibin Ragh,请你接受一个答案,还是只是标记用户2072923的答案,他只是复制了所有内容复制答案没有帮助