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 5 completed

0%

5 Questions

mid Level
1
How does CSS Grid work and how does it differ from Flexbox?
mid
grid
CSS Grid is a two-dimensional layout system for rows AND columns simultaneously, while Flexbox is one-dimensional (row OR column). Grid excels at page-level layouts and complex grids; Flexbox is better for component-level alignment and distribution within a single axis.
2
What is the difference between CSS transitions and animations?
mid
animations
Transitions animate between two states when a property changes (e.g., on hover), requiring a trigger. Animations use @keyframes to define multi-step sequences that can run automatically, loop infinitely, and control timing at each step independently.
3
What are CSS custom properties (variables) and how do they differ from Sass variables?
mid
custom-properties
CSS custom properties (--my-var) are native CSS variables that cascade, can be scoped to selectors, updated at runtime with JavaScript, and inherited by child elements. Sass variables ($my-var) are compile-time only and produce static output. CSS variables enable theming, dark mode, and dynamic styling without preprocessors.
4
Explain the CSS Flexbox axis model and how to solve common layout challenges with it.
mid
layout
Flexbox uses a main axis (direction items are laid out) and a cross axis (perpendicular). justify-content aligns items along the main axis, align-items along the cross axis. The flex shorthand controls how items grow, shrink, and their base size.
5
What are the advantages of utility-first CSS (Tailwind) over CSS-in-JS?
mid
methodologies
Utility-first CSS (Tailwind) compiles to static CSS with zero runtime overhead, works with React Server Components, and eliminates dead code through content-based purging. CSS-in-JS libraries (styled-components, Emotion) provide dynamic styles via props but add runtime overhead and are incompatible with Server Components.