在我的离子3项目中有一个scss文件,当我运行以下命令:npm运行scss-lint来测试scss语法时,我在cmd中得到了这些警告:
src/pages/profile/profile.scss:3:3 [W] NestingDepth: Nesting should be no greater than 1, but was 2
src/pages/profile/profile.scss:9:3 [W] NestingDepth: Nesting should be no greater than 1, but was 2
src/pages/profile/profile.scss:1
我有一个SCSS规则集,看起来有点像这样:
.thing {
div {
// rules
}
}
有时我想根据添加到body中的类来重新定义这个.thing div元素的样式,所以在标准的CSS中,我会这样做:
.thing div {
// rules
}
.deactivated .thing div {
// override for when it's in body.deactivated
}
有没有办法打破嵌套来指示SCSS中的顶级封闭选择器?
我们有项目,建立在Extjs和scss。我们希望提高scss的性能。我们使用了scss lint,并取得了较低的结果。
NestingDepth: Nesting should be no greater than 3, but was 4
如何将筑巢减少到3级?有什么方法可以帮助我们提高scss的性能?
已更新。请看下面的例子。
.x-grid-row,
.x-grid-row-alt {
color: $white-font-color !important;
&.x-grid-row,
&.x-grid-row-over {
co
人们可能会认为,我并不是唯一一个试图实现这一目标的人,所以我很惊讶在谷歌( Google )上找不到答案。我在谷歌上搜索错误的关键字..。
我正在寻找一种方法,以禁用从我的Laravel应用程序的自举糖图标组件。我用的是SASS版本的Bootstrap。
我能想象的唯一方法是在node_modules/bootsrap-sass/assets/stylesheets/_bootstrap.scss中注释掉这行node_modules/bootsrap-sass/assets/stylesheets/_bootstrap.scss,但如果我理解正确,那将是个坏主意,因为该目录的内容将被引导模块上