Sass @use with-block cannot override importing stylesheet variables
0 reputation · 11 Mar 2024, 23:43 UTC
Goal: Determine whether Sass @use 'module' with ($var: value) can override a variable defined in the importing stylesheet rather than in the loaded module.
The Sass language specification limits with-block overrides to variables belonging to the imported module. Variables declared in the importing stylesheet are excluded, and future support for importer variables remains an open design decision. Current Dart Sass and LibSass releases do not implement this override path.
It is unknown whether a future compiler will permit importer-variable overrides, how conflicts between module defaults and importer values would resolve, or whether authors should treat the capability as unsupported indefinitely.
- Does any released Dart Sass or LibSass version permit
@use withto replace an importer-declared variable? - If support arrives, will the importer value or the module default take precedence?
- Should authors avoid with-block importer overrides until the specification decides?