Performance: sass:math module
LOW IMPACT
Using the sass:math module affects the CSS compilation speed and the final CSS size, impacting initial page load speed.
@use 'sass:math'; .my-box { $third: math.div(100, 3); width: #{$third}%; margin-left: #{$third}%; }
@use 'sass:math'; .my-box { width: calc(100% / 3); margin-left: calc(100% / 3); }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Using CSS calc() for simple math | 0 | 1 per affected element | Low but repeated | [!] OK |
| Using sass:math module for compile-time math | 0 | 0 | Minimal | [OK] Good |