在父类选择器下嵌套导入

时间:2017-03-03 00:50:46

标签: css fonts sass font-face

我想将SCSS限制在某个模块中,理论上我想将我的导入嵌套在父级别类中

HTML

<body class="grandfather">
...
</body>

app.scss

@charset 'UTF-8';

@import 'scss/_vendors/__vendors-dir';
@import 'scss/_abstracts/__abstracts-dir';
@import 'scss/_base/__base-dir';
@import 'scss/_components/__components-dir';
@import 'scss/_layouts/__layouts-dir';
@import 'scss/_pages/__pages-dir';
@import 'scss/_themes/__themes-dir';

我尝试将导入嵌套在类.grandfather

app.scss(打破@fontface和@keyframes以及更多)

@charset 'UTF-8';

.grandfather {
    @import 'scss/_vendors/__vendors-dir';
    @import 'scss/_abstracts/__abstracts-dir';
    @import 'scss/_base/__base-dir';
    @import 'scss/_components/__components-dir';
    @import 'scss/_layouts/__layouts-dir';
    @import 'scss/_pages/__pages-dir';
    @import 'scss/_themes/__themes-dir';
}

.scss中是否有解决此问题的解决方案?

0 个答案:

没有答案