【发布时间】:2019-05-20 01:38:42
【问题描述】:
你能拿一个文件并用 sass 稍微更新每个 css 规则吗?例如
style.scss
.bold {
font-weight: 600
}
.bolder {
font-weight: 800
}
// ...
style-important.scss
// Here I want to import and produce the following:
.bold-important {
font-weight: 600 !important;
}
.bolder-important {
font-weight: 800 !important;
}
sass 可以制作这个吗?另一个 css 预处理器能做到这一点吗?
【问题讨论】:
-
如果您必须在所有规则之后加上
!important,您应该重新考虑 CSS 的设计。 -
@HereticMonkey 或者重新考虑工作,我相信设计好的 CSS 是贵公司的首要任务。
标签: css sass stylesheet meta