【发布时间】:2014-02-14 08:00:25
【问题描述】:
在 SCSS 中,具有通用 前缀 的属性可以描述为嵌套属性。因此,就像在example 中一样,
.funky{
font: 2px/3px{
family: fantasy;
size: 30em;
weight: bold;
}
}
编译为:
.funky{
font: 2px/3px;
font-family: fantasy;
font-size: 30em;
font-weight: bold;
}
我如何对具有共同词缀的属性做类似的事情?我怎样才能编写一个可以编译成这样的嵌套属性:
.funky{
color: red;
background-color: green;
border-color: blue;
}
【问题讨论】:
标签: css colors sass nested-properties