HTML & CSS · Senior · Question 14 of 75

How should Sass modules be included now that @import is deprecated?

Explanation

@use 'tokens' loads a module once and namespaces it (tokens.$primary) without polluting the global scope. @forward re-exports a module's members to build a style library's public API. Sass @import is deprecated and will be removed in Dart Sass 3.0. There's no @require directive.

Further reading

Problem with a question

HTML & CSS · Senior · question 14

Test yourself

Take the HTML & CSS · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz