Why put in front of the file name “_” or “_” in scss/css?

前端 未结 6 1776
悲&欢浪女
悲&欢浪女 2020-12-02 10:45

Why put _ in front of the filename in scss?

_filename.scss - Why does it need _ ?

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 11:11

    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.

提交回复
热议问题