How can you optimize CSS for performance?
Instruction: Describe techniques to optimize and improve performance of CSS.
Context: This question tests the candidate's knowledge of performance optimization techniques in CSS, including minimizing reflows and repaints, and efficient selectors.
Updated
Official answer available
Read the opening below, then unlock the full answer and practical guidance.
Start with a measured bottleneck: stylesheet download/blocking, style recalculation, layout, paint or compositing. Use a production build, representative pages and actual interaction traces. A smaller file and a faster interaction are related questions, not interchangeable measurements.
For delivery, remove genuinely unused rules, minify safely, compress transfers and cache versioned assets...