In SCSS, If @use
(before @import
) file with _
, it won't be generated into a CSS file. Isn't it right?
You can create partial Sass files that contain little snippets of CSS that you can include in other Sass files. This is a great way to modularize your CSS and help keep things easier to maintain. A partial is a Sass file named with a leading underscore. You might name it something like _partial.scss. The underscore lets Sass know that the file is only a partial file and that it should not be generated into a CSS file. Sass partials are used with the @use rule.
I've agreed that this is a good way to modularize my CSS. But, I saw that some users were negative about using _
when I was researching about this. I'm not sure why they don't prefer @import _file.scss
.
Should I avoid put in _
frount of the file name? If so, what is that reason?
Does the problems remain even with @use
?