将“.scss"文件包含在另一个“.scss"文件中? [英] Include `.scss` file in another `.scss` file?
本文介绍了将“.scss"文件包含在另一个“.scss"文件中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在另一个 .scss
文件中包含 .scss
文件?我试图把它写在一个文件中:app.scss:
@include('buttons');@include('dropzone');身体 {背景:$primaryColor;溢出-x:隐藏;/* 剪切 内内容的左/右边缘;element - 如果它溢出元素的内容区域:*/高度:100%;/* 用它的内容覆盖容器的所有(100%)主体 */填充顶部:70px;}/* 更多css代码在这里*/它返回一个错误:invalid css after @import
我尝试在主 scss
文件中包含另外 2 个 scss 文件,因此它最终将全部编译为一个 css
文件.怎么可能?
解决方案可以这样导入;
@import "../../_variables";@import "../_mixins";@import "_main";@import "_login";@import "_exception";@import "_utils";@import "_dashboard";@import "_landing";
根据你的目录,它会做你想做的.
How can I Include .scss
file in another .scss
file?
I was trying to write this in a file:
app.scss:
@include('buttons');
@include('dropzone');
body {
background: $primaryColor;
overflow-x: hidden; /*Clip the left/right edges of the content inside the <div> element - if it overflows the element's content area: */
height: 100%; /* Cover all (100%) of the container for the body with its content */
padding-top: 70px;
} /* more css code here */
and it returns an error : invalid css after @import
I try to include 2 other scss files inside the main scss
file, so it will be all compiled to one css
file eventually. How is it possible?
解决方案 You can import it like this;
@import "../../_variables";
@import "../_mixins";
@import "_main";
@import "_login";
@import "_exception";
@import "_utils";
@import "_dashboard";
@import "_landing";
According to your directories and it will do what you want.
这篇关于将“.scss"文件包含在另一个“.scss"文件中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文