Recall & Review
beginner
What is a container query in CSS?
A container query lets you apply styles to an element based on the size of its container, not the whole viewport. It helps make components adapt to their space.
Click to reveal answer
beginner
How do you declare a container in CSS for container queries?
Use
container-type property on the parent element. For example, container-type: inline-size; makes the container track its inline size (width in horizontal writing modes).Click to reveal answer
intermediate
Why prepare your Sass code for container queries?
Preparing Sass helps organize styles, reuse code, and easily add container queries later without rewriting everything.
Click to reveal answer
intermediate
What Sass feature helps you write container queries cleanly?
Sass mixins let you write container query blocks once and reuse them with different parameters for cleaner code.Click to reveal answer
beginner
How do container queries improve responsive design compared to media queries?
Container queries respond to the container's size, so components adapt wherever they are used, not just based on the whole screen size like media queries.
Click to reveal answer
Which CSS property defines a container for container queries?
✗ Incorrect
The correct property to declare a container is
container-type.What does
container-type: inline-size; do?✗ Incorrect
inline-size tracks the container's inline size (width in horizontal writing modes), enabling queries based on width.Why use Sass mixins for container queries?
✗ Incorrect
Mixins help reuse container query styles without repeating code.
Container queries respond to which size?
✗ Incorrect
Container queries respond to the size of the container element.
Which is NOT a benefit of container queries?
✗ Incorrect
Container queries do NOT depend only on viewport size; that is media queries.
Explain how to prepare Sass code for container queries in a project.
Think about how Sass features help manage container queries.
You got /4 concepts.
Describe the difference between container queries and media queries.
Focus on what triggers the style changes.
You got /4 concepts.