Overview - Importing built-in modules with @use
What is it?
In Sass, the @use rule lets you bring in built-in modules to use their features like functions, variables, and mixins. These built-in modules are collections of helpful tools Sass provides by default. Using @use helps keep your styles organized and avoids conflicts by giving each module its own namespace. This is a modern way to include Sass features instead of the older @import rule.
Why it matters
Without @use, stylesheets could get messy and variables or functions from different files might clash, causing bugs or unexpected results. @use solves this by clearly separating where each feature comes from, making your code easier to read and maintain. It also improves performance because Sass loads each module only once. This means your stylesheets stay clean and efficient as projects grow.
Where it fits
Before learning @use, you should understand basic Sass syntax, variables, and mixins. Knowing how @import works helps to see why @use is better. After mastering @use, you can learn about creating your own modules and using @forward to share features between files.