โ† All CSS Flashcard Decks

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
  1. What does the ':where()' pseudo-class contribute to specificity?

    Answer: Zero specificity

    :where() always has zero specificity regardless of the selectors it contains.

  2. 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.

  3. 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.

  4. Which function generates a repeating set of grid tracks compactly?

    Answer: repeat()

    repeat(count, track) generates repeated track definitions in grid templates.

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

  6. 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.

  7. 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.