79797767

Date: 2025-10-23 12:15:10
Score: 1
Natty:
Report link

Use modern Sass @use for theme variables. Create one entry file per scheme, @use the scheme at the top, then @use your partials. Partials access variables via @use "theme" as *. This avoids duplicating partials and compiles each scheme to its own CSS. Example:

// scheme_alpha.scss
@use "themes/scheme_alpha" as theme;
@use "_styles";

// _styles.scss
@use "theme" as *;
@use "_header";
@use "_footer";

// _header.scss
.header {
  background-color: $color_primary;
  color: $color_secondary;
}

Each scheme file builds its own CSS without changing the partials.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @use
  • User mentioned (0): @use
  • User mentioned (0): @use
  • User mentioned (0): @use
  • Low reputation (1):
Posted by: Kamran Javed