【发布时间】:2015-11-24 17:53:40
【问题描述】:
这些项目是 .pane-content .meta-wrapper 的孩子,但我真的只是在学习 sass,我无法通过向班级的所有孩子添加通用样式设置来找出是否有更简单的方法@ 987654324@ 使用 :after 选择器。我已经看到并尝试了与此 treehouse 教程中的定位子元素有关的示例,但无济于事。
有没有办法定义一次使用的通用样式,然后将变量content: ""; 样式应用于每个类?
.pane-content {
font-size: 14px;
text-transform: uppercase;
line-height: 1;
vertical-align: middle;
.field-booth:after {
@include budicon();
content: '\e8c7';
font-size: 25px;
color: $green;
}
.field-website:after {
@include budicon();
content: '\ea59';
font-size: 25px;
color: $green;
}
.field-locations:after{
@include budicon();
content: '\e9b8';
font-size: 25px;
color: $green;
}
.date-range:after{
@include budicon();
content: '\e99d';
font-size: 25px;
color: $green;
}
p {
margin: 0;
}
}
【问题讨论】:
-
我不明白问题出在哪里。
-
我认为你没有花足够的时间阅读 Sass 网站上的文档。
标签: css sass css-selectors