JS Guide
HomeQuestionsTopicsCompaniesResources
BookmarksSearch

Built for developers preparing for JavaScript, React & TypeScript interviews.

ResourcesQuestionsSupport
HomeQuestionsSearchProgress
HomeQuestionscss

css

CSS layouts, selectors, animations, and modern features

Explore 12 css topics to deepen your understanding

Your Progress

0 of 3 completed

0%

3 Questions

senior Level
1
What are CSS container queries and how do they improve on media queries?
senior
container-queries
Container queries (@container) let you style elements based on the size of their parent container rather than the viewport. This enables truly reusable components that adapt to wherever they're placed, unlike media queries which only respond to the browser window size.
2
What are CSS cascade layers (@layer) and how do they help manage specificity?
senior
cascade-layers
Cascade layers (@layer) let you group CSS rules into named layers with explicit priority ordering. Rules in later-declared layers override earlier ones regardless of selector specificity, giving you architectural control over which styles win without resorting to !important or specificity hacks.
3
How do you optimize CSS for performance?
senior
performance
Key CSS performance techniques: minimize render-blocking CSS with critical CSS inlining, use content-visibility for off-screen elements, only animate transform/opacity (GPU-accelerated), avoid expensive selectors, use will-change sparingly, leverage CSS containment, and reduce unused CSS with purging tools.