CSS Advanced Practice Flashcards
7 cards from real CSS practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 CSS Advanced Practice flashcards as text
What does the ':where()' pseudo-class contribute to specificity?
Answer: Zero specificity
:where() always has zero specificity regardless of the selectors it contains.
Which property enables snapping during scroll on a container?
Answer: scroll-snap-type
scroll-snap-type on the container activates scroll snapping along an axis.
What does 'inset: 0' shorthand set on a positioned element?
Answer: top, right, bottom, and left all to 0
inset is shorthand for top/right/bottom/left, so inset: 0 stretches a positioned element to fill its containing block.
Which function generates a repeating set of grid tracks compactly?
Answer: repeat()
repeat(count, track) generates repeated track definitions in grid templates.
What is the difference between auto-fill and auto-fit in repeat()?
Answer: auto-fit collapses empty tracks while auto-fill keeps them
auto-fit collapses empty repeated tracks so existing items stretch, whereas auto-fill preserves the empty tracks.
Which property allows text to be clipped to a gradient for colored text effects?
Answer: background-clip: text
background-clip: text with transparent text color shows the background through the glyphs.
What does the 'accent-color' property style?
Answer: Form controls like checkboxes and radios
accent-color sets the tint used by form controls such as checkboxes, radios, and range inputs.