为什么要在文件名"_"前面加上或"_"在scss/css中? [英] Why put in front of the file name "_" or "_" in scss/css?
本文介绍了为什么要在文件名"_"前面加上或"_"在scss/css中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么将_
放在scss中的文件名前面?
Why put _
in front of the filename in scss?
_filename.scss
-为什么需要_
?
推荐答案
_(下划线)是scss的一部分.这意味着样式表将被导入(@import)到主样式表,即styles.scss.使用partials的好处是您可以使用许多文件来组织代码,并且所有内容都将被编译到一个文件中.
The _ (underscore) is a partial for scss. That means the stylesheet its going to be imported (@import) to a main stylesheet i.e. styles.scss. The advantage on using partials is that you can use many files to organize your code and everything will be compiled on a single file.
这篇关于为什么要在文件名"_"前面加上或"_"在scss/css中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文