Andrew's Digital Garden

@use in SASS

Remember when using the @use keyword, that the entire file is imported and built together. Mixins, functions, and variables are loaded, but crucially the styles in that file will also be compiled together.

When trying to bundle certain files, keep this in mind, as you may be unintentionally bundling CSS you don't want to. You can't import a single function like you can in say, Javascript.

The usual fix for this is file separation - move the mixins, functions, etc. away from the 'regular' styling, so that you can import them separately.

https://sass-lang.com/documentation/at-rules/use/

[[css]]

@use in SASS