Skip to content
tezvyn:

Top 30 Advanced CSS & Design Systems Concepts Quiz

30 advanced multiple-choice CSS & Design Systems concept questions, the corners that separate having used it from understanding it: internals, edge cases, and the reasons behind the design. They come from 30 bites in the CSS & Design Systems library, the hardest slice of the 169 CSS & Design Systems concept questions in the library. Answer them here or read straight down. Every question carries the correct option, why it is correct, and a link to the bite it came from.

Tailwind, CSS, accessibility, design tokens

30 questions. Pick an answer, or open “Show the answer” to read it.

Answers are graded in your browser. Nothing is saved, and no XP or streak is earned here. The app keeps score.

  1. Question 1 of 30

    What is a direct consequence of CSS pseudo-elements not being part of the standard Document Object Model (DOM)?

    Show the answer

    Answer: c · They cannot be directly selected or manipulated by JavaScript.

    The card states, "You cannot attach JavaScript event listeners to them, as they are not in the DOM," directly linking their non-DOM status to JavaScript manipulation limitations. Distractor C is incorrect because the card mentions their styles are dynamic, adapting to layout changes.

    Read the full bite: CSS Pseudo-elements: Styling Parts of an Element

  2. Question 2 of 30

    Why might an element with z-index: 9999 still appear behind another element with z-index: 10?

    Show the answer

    Answer: d · The element with z-index: 9999 is a descendant of an element that established a new stacking context, which itself is stacked below the z-index: 10 element.

    A new stacking context traps its descendants, meaning they can only stack relative to each other within that context. If the element creating this context is itself stacked below another element (like the z-index: 10 element), its children, regardless of their high z-index, cannot escape to appear above it. Option C is incorrect because while transform creates a stacking context, it doesn't automatically elevate its stacking order above all others; its position is still relative to its parent's context.

    Read the full bite: CSS Stacking Contexts: The Z-Axis Explained

  3. Question 3 of 30

    Which common layout issue involving a parent container and its floated child elements is directly resolved by establishing a Block Formatting Context (BFC) on the parent?

    Show the answer

    Answer: d · The parent container's background or border failing to expand and enclose its floated children.

    The card explicitly states that a primary use of BFC is to 'contain floats' and gives an example where a parent's border fails to wrap a floated image, which a BFC fixes. While BFCs also prevent margin collapse (Option B), the question specifically asks about issues involving 'parent container and its floated child elements', making float containment the most direct answer.

    Read the full bite: Block Formatting Context: Taming Floats and Margins

  4. Question 4 of 30

    Which CSS property, applied to an ancestor with `position: static`, would establish it as the containing block for a `position: absolute` child?

    Show the answer

    Answer: c · transform

    The card states that for absolute elements, an ancestor with properties like `transform`, `filter`, or `perspective` will become the containing block, even if its own `position` is `static`. While `position: relative` does create a containing block, it requires the ancestor's position to be non-static, which contradicts the question's premise.

    Read the full bite: CSS Containing Block: The Box That Defines Your Box

  5. Question 5 of 30

    A developer needs to implement a responsive design that dynamically adjusts font weight and width across various screen sizes while minimizing HTTP requests. Which approach is most effective?

    Show the answer

    Answer: d · Using a single variable font file that defines multiple variation axes.

    Variable fonts allow a single file to contain all variations along axes like weight and width, enabling fine-grained adjustments via CSS without multiple HTTP requests, which is ideal for responsive design and performance. Loading separate static files (Option C) would increase HTTP requests and download size, directly contradicting the goal of minimizing requests.

    Read the full bite: Variable Fonts: One File, Infinite Styles

  6. Question 6 of 30

    When should filter: drop-shadow() be chosen over box-shadow for applying a shadow effect?

    Show the answer

    Answer: c · To apply a shadow that conforms to the irregular shape of an element's content.

    The card states that filter: drop-shadow() is "the best way to apply a shadow to a non-rectangular shape (like a transparent PNG or an SVG)". While filter is hardware-accelerated, the card also advises that box-shadow is more direct and often more performant for simple rectangular shadows, making option B incorrect as a general preference.

    Read the full bite: CSS Filter: Photoshop-like Effects in the Browser

  7. Question 7 of 30

    Which CSS property is most appropriate for combining multiple background gradients and applying a color tint to a background image within a single element?

    Show the answer

    Answer: a · background-blend-mode

    background-blend-mode is specifically designed for blending multiple background layers (like gradients or images) within a single element, and for applying effects like color tints to background images. mix-blend-mode, while also a blend mode, blends an entire element with the content behind it in the stacking context, not its own background layers.

    Read the full bite: CSS Blend Modes: Photoshop Effects in the Browser

  8. Question 8 of 30

    When an element has a clip-path applied, how does it interact with the document flow and surrounding elements?

    Show the answer

    Answer: b · The element's original rectangular box is preserved in the document flow, and surrounding elements behave as if the clipped parts are still present.

    The card explicitly states that "clip-path only hides parts of the element visually; it does not change the element's underlying rectangular shape in the document flow. Other elements will not wrap around your custom shape." This means the element continues to occupy its original rectangular space in the layout. Option D describes a common misconception, as clip-path does not alter the element's box model for layout purposes.

    Read the full bite: CSS clip-path: Break Out of the Box

  9. Question 9 of 30

    Which statement correctly describes the primary function of backdrop-filter in CSS?

    Show the answer

    Answer: c · It applies graphical effects to the content behind an element, requiring the element itself to be semi-transparent.

    backdrop-filter is designed to apply effects to the content *behind* an element, acting like frosted glass, and requires the element to have some transparency to reveal the filtered background. It does not filter the element itself; that is the role of the standard 'filter' property.

    Read the full bite: backdrop-filter: Styling What's Behind an Element

  10. Question 10 of 30

    What is the primary benefit of using auto-fit instead of auto-fill when creating a responsive CSS Grid layout?

    Show the answer

    Answer: a · It allows grid items to expand and occupy space from collapsed empty tracks.

    auto-fit collapses empty grid tracks to 0px, allowing content items to expand and fill the available space. In contrast, auto-fill maintains these empty tracks, which prevents items from growing.

    Read the full bite: CSS Grid: auto-fit vs. auto-fill

  11. Question 11 of 30

    When designing a layout where elements within different grid items need to align precisely with each other or the main page grid, what unique problem does CSS Subgrid solve?

    Show the answer

    Answer: c · It enables a nested grid to borrow and extend the parent grid's track definitions, ensuring consistent alignment.

    CSS Subgrid's primary purpose is to allow a nested grid to inherit and utilize its parent's grid tracks, enabling precise alignment of elements across different grid items or with the main grid. Option B describes the behavior of a standard nested grid, which is independent of its parent's tracks, and is precisely the problem subgrid was created to overcome.

    Read the full bite: CSS Subgrid: Aligning Nested Grids

  12. Question 12 of 30

    A product card needs to adapt its internal layout based on the width of the container it's placed in. Which CSS feature is best suited for this?

    Show the answer

    Answer: d · A CSS Container Query on the product card's parent

    Container queries are designed for components to adapt their styling based on the space provided by their parent, making them ideal for reusable components like a product card. Traditional media queries respond to the overall viewport size, not a component's specific allocated space, which is explicitly stated as a limitation container queries solve.

    Read the full bite: CSS Container Queries: Style Components, Not Just Pages

  13. Question 13 of 30

    What is the main benefit of using the CSS clamp() function for responsive design?

    Show the answer

    Answer: b · It provides a single-line solution for smoothly scaling a CSS property between a minimum and maximum value.

    The correct answer (B) highlights clamp()'s primary benefit: providing smooth, fluid scaling of a CSS property within defined minimum and maximum values. Options A and C describe the functionality of traditional media queries for discrete changes, while D incorrectly suggests clamp() overrides its own limits.

    Read the full bite: CSS clamp(): Fluid Sizing in One Line

  14. Question 14 of 30

    To effectively use media queries and avoid common pitfalls, which principle should be prioritized?

    Show the answer

    Answer: d · Focus on adapting styles based on the viewport's current properties, such as width or orientation.

    The card emphasizes styling for viewport properties like width and orientation, rather than making assumptions about specific device types. Guessing device types is a common pitfall that can lead to incorrect layouts when users resize browser windows or use unconventional devices.

    Read the full bite: Media Queries: CSS That Adapts to the User's Device

  15. Question 15 of 30

    What core limitation of traditional Responsive Web Design (RWD) does Intrinsic Web Design primarily overcome for building truly reusable components?

    Show the answer

    Answer: c · RWD's tendency to force component layout decisions to be tied to the global viewport context.

    Intrinsic Web Design addresses RWD's limitation of tying component layout to the global viewport, allowing components to adapt based on their immediate container. RWD's core function is to define breakpoints for different screen sizes, making option B incorrect.

    Read the full bite: Intrinsic Web Design: Components That Style Themselves

  16. Question 16 of 30

    When is the most appropriate time to apply the `will-change` CSS property to an element?

    Show the answer

    Answer: a · Just before an animation is expected to start, and then remove it once the animation completes.

    The card explicitly states that `will-change` should be applied with JavaScript just before an animation and removed once it completes. Applying it generally or preemptively (like option C suggests) is warned against, as it can lead to worse performance due to wasted memory.

    Read the full bite: CSS `will-change`: A Performance Hint, Not a Magic Wand

  17. Question 17 of 30

    Why are CSS animations using 'transform' and 'opacity' generally smoother than those using properties like 'width' or 'left'?

    Show the answer

    Answer: b · The browser can create a separate compositing layer for elements animated with these properties, allowing the GPU to handle the animation without affecting layout.

    The card explains that 'transform' and 'opacity' allow the browser to promote an element to its own compositing layer, which the GPU can then manipulate efficiently without involving the CPU or affecting page layout. This offloading to the GPU and avoidance of layout recalculations is key to smooth animations. Option C is a tempting distractor because these properties do avoid reflows, but it incorrectly states the animation happens 'directly on the main thread' rather than being offloaded to the GPU.

    Read the full bite: Hardware Acceleration: Getting Smooth CSS Animations

  18. Question 18 of 30

    A developer applies transform-style: preserve-3d to a container, but its children still appear flattened. What is the most likely reason?

    Show the answer

    Answer: b · The container element has an opacity value less than 1.

    The card states that properties like opacity less than 1 on the container element will force transform-style to flat, breaking the 3D context. While perspective is crucial for 3D appearance, its absence does not force flattening of the 3D context itself.

    Read the full bite: CSS transform-style: Let Children Live in 3D Space

  19. Question 19 of 30

    Which property must be animated to make an element traverse the trajectory defined by `offset-path`?

    Show the answer

    Answer: c · offset-distance

    The card explains that `offset-path` lays down the track, but `offset-distance` is the 'train engine' that moves the element along that track. While `transform` or `top`/`left` are used for other types of animation, they do not control movement along an `offset-path`. `offset-rotate` controls the element's orientation, not its progress along the path.

    Read the full bite: CSS Motion Path: Animate on a Curve

  20. Question 20 of 30

    Which animation scenario is LEAST appropriate for implementation using a CSS scroll-driven animation?

    Show the answer

    Answer: d · A small icon that rotates indefinitely to indicate an ongoing background process.

    Scroll-driven animations link an animation's progress to the scrollbar's position, making them ideal for effects like progress bars, fade-ins on scroll, and parallax. A loading spinner that rotates indefinitely is an animation independent of user interaction and should use a traditional time-based animation, not a scroll-driven one.

    Read the full bite: Scroll-driven Animations: Animate on Scroll, Not Time

  21. Question 21 of 30

    What is the primary problem ITCSS aims to solve in large, long-lived CSS projects?

    Show the answer

    Answer: a · To establish a predictable specificity hierarchy, preventing unintended style overrides and conflicts.

    ITCSS's core purpose is to manage the global nature of CSS by creating a clear, predictable order of specificity from generic to specific, thereby preventing the 'specificity wars' and 'unpredictable styling' that plague large projects. Option C is incorrect because ITCSS manages global styles, it doesn't isolate them like CSS-in-JS.

    Read the full bite: ITCSS: Structuring CSS from General to Specific

  22. Question 22 of 30

    What is the primary advantage of using Critical CSS in web development?

    Show the answer

    Answer: a · It enables the browser to display above-the-fold content immediately, bypassing render-blocking.

    The correct answer (A) directly reflects the core purpose of Critical CSS: to prevent render-blocking by inlining essential styles, allowing immediate display of visible content. Option D is incorrect because Critical CSS only reduces the initial render-blocking payload, not the total CSS file size, as the full stylesheet is still loaded.

    Read the full bite: Critical CSS: Render Above-the-Fold Content Instantly

  23. Question 23 of 30

    What is the primary mechanism by which Design Tokens ensure visual consistency across multiple platforms?

    Show the answer

    Answer: b · They establish a central, language-agnostic definition of visual properties that build tools convert for each platform.

    Design tokens achieve consistency by defining visual properties in a central, platform-agnostic format (like JSON). Build tools then translate this single source of truth into the native styling code required for each specific platform, ensuring uniform application of styles. Distractor A is incorrect because designers define tokens, not platform-specific code directly.

    Read the full bite: Design Tokens: A Standardized Language for Your UI

  24. Question 24 of 30

    When using CSS Cascade Layers with @layer base, components, utilities;, which style declaration will ultimately take precedence for a property if all are applied to the same element?

    Show the answer

    Answer: d · An !important rule defined within the base layer.

    For !important rules, the layer priority is inverted, meaning the first declared layer (base) wins. Additionally, an !important rule inside any layer beats an !important rule defined outside of any layer.

    Read the full bite: CSS Cascade Layers: Control Your Cascade

  25. Question 25 of 30

    Which scenario is an inappropriate use case for a Sass function?

    Show the answer

    Answer: c · Generating multiple CSS properties for a component's styling.

    Sass functions are designed to calculate and return a single value, not to output blocks of CSS or multiple properties; that functionality is reserved for mixins. Options A, B, and D all describe scenarios where a single value is calculated and returned, which is the primary purpose of a Sass function.

    Read the full bite: Sass Functions: Reusable Logic for Your Styles

  26. Question 26 of 30

    When would a developer be unable to utilize Sass built-in modules in their project?

    Show the answer

    Answer: b · When the project's build process relies on an older Sass compiler like LibSass.

    The card explicitly states that older compilers like LibSass do not support the @use rule required for built-in modules, making them unusable in such projects. Options A, B, and D describe scenarios where built-in modules are beneficial and intended for use.

    Read the full bite: Sass Built-in Modules: Namespaced Power Tools

  27. Question 27 of 30

    What is the primary objective of employing the 'dream-driven development' approach for component API design?

    Show the answer

    Answer: d · To prioritize developer experience and intuitive usage by envisioning the ideal interaction.

    The card states that 'dream-driven development' involves writing the ideal usage snippet 'to anchor your design around the best possible developer experience.' This approach prioritizes intuition and user experience. While it might lead to simpler APIs, its primary goal isn't merely to minimize properties (Option A), but to design for optimal usability and adoption.

    Read the full bite: Designing Durable Component APIs

  28. Question 28 of 30

    Which feature of the W3C Design Tokens specification is most crucial for maintaining consistency across a design system when primitive values change?

    Show the answer

    Answer: b · The use of aliases, enabling semantic tokens to reference and resolve primitive values.

    Aliases are explicitly stated as the mechanism that allows semantic tokens to reference primitive values, ensuring a single change to a primitive propagates everywhere. While the standard JSON structure enables tool compatibility, aliases are key for internal system consistency during value updates.

    Read the full bite: W3C Design Tokens: A JSON Standard for Design Systems

  29. Question 29 of 30

    What is the primary benefit of using a design token build pipeline in a large, multi-platform project?

    Show the answer

    Answer: b · It ensures design consistency and automates code generation across diverse platforms and teams.

    The card states that design tokens solve scaling problems by establishing a single source of truth, and the pipeline automates the translation of these decisions into platform-specific code, ensuring consistency across platforms and teams. Option C is tempting but incorrect because while tokens centralize values, their primary goal isn't to reduce the total count of unique values, but to formalize and consistently apply decided values, replacing arbitrary 'magic numbers'.

    Read the full bite: Design Tokens: Automating UI with a Build Pipeline

  30. Question 30 of 30

    What is the primary outcome if a Form-Associated Custom Element does not invoke setFormValue()?

    Show the answer

    Answer: b · The custom element's value will not be included in the data submitted with the parent form.

    The card explicitly states that a custom element's state 'won't submit if you don't call setFormValue()'. This method is essential for the element to provide its value to the form for submission. Without it, the form submits, but the custom element's data is absent, not causing a validation error or reverting its form association.

    Read the full bite: Form-Associated Custom Elements: Your Own Inputs

Could you explain these out loud?

That is what an interview actually tests. Tezvyn gives you questions like these with what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon