Performance: Built-in string functions
LOW IMPACT
Using built-in string functions in Sass affects the CSS generation speed during build time, not the browser rendering performance.
.selector { content: str-slice("example", 2); }
@function slow-string($input) { @return unquote(str-slice($input, 2)); } .selector { content: slow-string("example"); }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Using custom string functions in Sass | 0 | 0 | 0 | [!] OK (build slower) |
| Using built-in Sass string functions | 0 | 0 | 0 | [OK] Good |