Performance: Partial files with underscore prefix
This affects CSS build time and bundle size by controlling which Sass files are compiled directly.
@import 'buttons'; @import 'header'; // Using _buttons.scss and _header.scss as partials with underscore prefix
@import 'buttons.scss'; @import 'header.scss'; // All Sass files compiled directly without partials
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Compiling all Sass files directly | N/A | N/A | High due to large CSS | [X] Bad |
| Using underscore-prefixed partials | N/A | N/A | Lower due to smaller CSS | [OK] Good |
_variables.scss)?_mixins.scss into another Sass file?_mixins.scss, write @import 'mixins'; without underscore or extension._colors.scss contains:$primary-color: blue;
main.scss contains:@import 'colors';
body { color: $primary-color; }_colors.scss file defines $primary-color: blue;.colors partial and uses $primary-color in body color._buttons.scss but when you compile your main Sass file, styles from _buttons.scss are missing. What is the most likely cause?_buttons.scss is correct.@import 'buttons';.buttons partial in the main Sass file -> Option D_reset.scss, _typography.scss, and _layout.scss. How should you structure your main Sass file to compile all styles into one CSS file?@import statements for each partial: @import 'reset';, @import 'typography';, @import 'layout';.Pass the test and this pattern moves unknown