HTML & CSS · Senior · Question 14 of 75
How should Sass modules be included now that @import is deprecated?
- 1With
@require, which replaced@importin Dart Sass 2 - ✓Correct answer: With namespaced
@useand@forwardfor re-exporting - 3Only with plain CSS
@import url(), since Sass modules were removed
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.