Question
Error: Can't find stylesheet to import with @forward and @use variable precedence
Dev Finch
0 reputation · 09 Dec 2024, 19:08 UTC
97.3K views0
Goal
Determine which variable value is ultimately used when a module forwards a variable that is also defined in the importing module, and whether the implementation honors the documented rule that @forward should not expose locally defined variables.
Constraints
- Testing in Dart Sass 1.71 and Ruby Sass 3.7.
- Modules may define identical variable names, optionally using
asaliasing. - Both
@useand@forwardare employed in the same project.
Unresolved Questions
- When a variable is defined in the importing module and also forwarded from an imported module, does the importing module’s definition always shadow the forwarded one?
- Does using the
askeyword with@forwardalter the shadowing behavior, especially when an alias conflicts with a local variable? - Is the error message for a missing stylesheet still the same when
@forwardis involved, or does it change based on module resolution order?