0
0
Tailwindmarkup~20 mins

Scroll-snap containers in Tailwind - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Scroll Snap Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding scroll-snap-type behavior
Which Tailwind CSS class correctly sets a horizontal scroll container to snap to each child element when scrolling?
Asnap-y snap-mandatory
Bsnap-y snap-proximity
Csnap-x snap-none
Dsnap-x snap-mandatory
Attempts:
2 left
💡 Hint
Think about the axis direction and how strictly snapping should happen.
📝 Syntax
intermediate
2:00remaining
Fix the scroll-snap child class
Which option correctly applies the Tailwind class to make a child element snap to the start of the scroll container?
Asnap-begin
Bsnap-start
Csnap-top
Dsnap-left
Attempts:
2 left
💡 Hint
Tailwind uses specific keywords for snap alignment, not directional words like 'top' or 'left'.
rendering
advanced
2:00remaining
Visual effect of scroll-snap-align classes
Given a horizontal scroll container with snap-x snap-mandatory, what visual effect will a child element with snap-center have when scrolling?
AThe child snaps so its center aligns with the container's center when scrolling stops.
BThe child snaps so its left edge aligns with the container's left edge.
CThe child snaps so its right edge aligns with the container's right edge.
DThe child does not snap and scrolls freely.
Attempts:
2 left
💡 Hint
Think about what 'center' means in scroll snapping.
selector
advanced
2:00remaining
Choosing the correct scroll-snap-stop class
Which Tailwind CSS class ensures that a scroll snap point cannot be skipped during fast scrolling?
Asnap-stop-never
Bsnap-stop-mandatory
Csnap-stop-always
Dsnap-stop-proximity
Attempts:
2 left
💡 Hint
Look for the class that forces the scroll to always stop at snap points.
accessibility
expert
3:00remaining
Improving accessibility for scroll-snap containers
Which practice best improves keyboard accessibility for a scroll-snap container with horizontal overflow?
AAdd <code>tabindex="0"</code> to the container and ensure arrow keys scroll the container horizontally.
BDisable keyboard focus on the container to prevent confusion.
CUse only mouse events for scrolling and hide scrollbars.
DAdd <code>aria-hidden="true"</code> to the container to reduce screen reader noise.
Attempts:
2 left
💡 Hint
Think about how keyboard users can interact with scrollable content.