Performance: sass:list module
MEDIUM IMPACT
Using the sass:list module affects CSS compilation speed and the size of the generated CSS, impacting initial page load and render time.
@use 'sass:list'; .selector { color: list.nth(1, 2, 3, 1); }
@function get-first($list) { @return nth($list, 1); } .selector { color: get-first(1, 2, 3); }
| Pattern | Sass Compile Time | CSS Size | Browser Parse Cost | Verdict |
|---|---|---|---|---|
| Custom list functions | High (linear with list size) | Larger | Higher due to verbose CSS | [X] Bad |
| sass:list module functions | Low (optimized native) | Smaller | Lower due to concise CSS | [OK] Good |