Performance: SASS compilation to CSS
MEDIUM IMPACT
This affects the page load speed by determining how quickly CSS styles are available for rendering.
<link rel="stylesheet" href="styles.css"> /* Precompiled CSS file linked in HTML */
@import 'styles.scss'; /* Using runtime SASS compilation in browser */
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Runtime SASS compilation in browser | N/A | Multiple reflows due to delayed styles | High paint cost due to style recalculation | [X] Bad |
| Precompiled CSS from SASS | N/A | Single reflow on initial load | Low paint cost with immediate styles | [OK] Good |