Performance: sass:string module
LOW IMPACT
Using the sass:string module affects the CSS build time and output size, impacting how fast styles are generated and applied.
@use "sass:string"; $color-name: "blue"; $color-var: string.join(("var(--", $color-name, ")"), ""); .selector { color: unquote($color-var); }
@use "sass:string"; $color-name: "blue"; $color-var: unquote("var(--" + $color-name + ")"); .selector { color: $color-var; }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Manual string concatenation with + and unquote | 0 | 0 | 0 | [X] Bad - slows Sass compilation |
| Using sass:string string.join function | 0 | 0 | 0 | [OK] Good - faster compilation |