Using Gumby, when I import a new custom scss file into gumby.scss, do I include an underscore?

StackOverflow https://stackoverflow.com/questions/20533052

質問

I noticed that in the gumby.scss file, there is the line:

@import "custom";

... but the filename itself is _custom.scss.

For every file that I create after that, do I include the underscore?

As an example, if I create a file _custom2.scss, would I then use the import

@import "custom2";

or

@import "_custom2":

?

If it assumes that there will be an underscore in the file name, what are the rules for its assumptions? Does it do that with all filenames?

役に立ちましたか?

解決

You can use either.

A file that begins with an _ is a partial in Sass.

Basically, if you want it to generate its own css file, don't add the underscore. If you want to import it into another sass file, use the _.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top