Nesting lets you write media queries inside selectors, keeping related responsive styles together. This makes the CSS easier to read and update.
Option C correctly nests the media query inside the selector using @media. Option C is valid CSS but not nested inside the selector. Options A and D have syntax errors.
.nav {
background: blue;
ul {
list-style: none;
@media (max-width: 500px) {
display: none;
}
}
}.nav { background: blue; ul { list-style: none; @media (max-width: 500px) { display: none; } } }
SASS nests the media query inside the selector, so the output CSS places the media query wrapping the nested selector .nav ul. Option B matches this exactly.
SASS variables store values like widths or breakpoints. Changing a variable updates all places it is used, making responsive adjustments faster and less error-prone.
Using SASS functions with relative units and CSS clamp() allows font sizes to scale fluidly between minimum and maximum sizes, improving readability and respecting user settings.