A five-card carousel snaps cards to the inline center and generates one ::scroll-marker per card. At an exact snap point, the centered card and current marker can agree. Between snap points, during a user drag or after layout changes, the marker algorithm and snap process must still be traced independently rather than reporting “the selected dot is the snap target” as a definition.
This lesson continues The Gold Standard of Websites, the Gold Standard of Education and the How X Works hub. Every carousel, target rectangle, marker group and scroll position is an original synthetic fixture. The lesson does not claim universal browser support, replace accessible names with visual dots, equate focus with selection or treat an editor draft as a settled cross-browser contract.
Record scroll container, marker group position and mode, marker origin, indicated target, target geometry, scroll offset, snap type, snap area and alignment, active marker, :target-current match, focus, event timing, writing mode, browser build and unavailable behavior.
The CSS Overflow Module Level 5 scroll-marker section defines marker groups, modes, active-marker calculation and :target-current. The CSS Scroll Snap specification defines snap areas and alignment. Overflow Level 5 is a working editor draft, so this lesson states its status, dates observations and avoids universal support claims.
THE GOLD STANDARD · WEBSITES
Snap alignment constrains a scroll position; marker selection identifies the current target under a separate algorithm
CSS Overflow Level 5 defines scroll markers and an active marker represented by :target-current. CSS Scroll Snap defines snap areas, snapports and alignment. A marker may point to a snap-aligned item, but the marker’s current state is not merely the presence of scroll-snap-align, and a snapped element does not become a scroll marker without the marker mechanism.
Fast route
Start with the decisive rule.
Start this route
Measurement route
Build the browser state and evidence ledger.
Start this route
Comparison route
Separate the nearest lookalikes.
Start this route
Transfer route
Change the context and retest.
Start this route
Reporting route
State limits and continue reading.
Start this route
Chapter contents
Open the full chapter index
- 1. Give the marker-versus-snap rule
- 2. Build the marker group
- 3. Identify each indicated target
- 4. Require generated content where applicable
- 5. Calculate current marker from position
- 6. Separate :target-current from URL :target
- 7. Compare links and tabs modes
- 8. Keep focus separate from current state
- 9. Trace snap geometry separately
- 10. Handle between-position states
- 11. Respond to layout changes
- 12. Respect writing modes and axes
- 13. Test marker activation
- 14. Check keyboard and accessibility evidence
- 15. Repair common shortcuts
- 16. Answer practical questions
- 17. Create a reproducible marker ledger
- 18. Use draft sources and continue
1. Give the marker-versus-snap rule
A scroll marker owns an indicated scroll target and can become the active marker. Scroll snap constrains end positions through separate geometry and strictness rules.
Original worked example. Card 3 is centered at a snap point and marker 3 is current, producing agreement without merging the mechanisms. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Disable scroll snapping while leaving generated markers. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Log marker state and snap state in different columns. If this check fails, mark the claim unavailable and repair the method before continuing.
Keep method, object state and the final claim in separate fields so a matching visual result cannot rewrite platform evidence.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
2. Build the marker group
scroll-marker-group controls generation of a group before or after the scroller. The group is a sibling-like generated box, not ordinary authored child content.
Original worked example. A carousel generates the group after its scroll container and markers from card pseudo-elements. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Switch the group to before without changing scroll position. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Record originating element, group position, box and marker membership. If this check fails, mark the claim unavailable and repair the method before continuing.
Use a positive case, a clean negative case and an unavailable case. Unavailable evidence means the required field could not be established.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
3. Identify each indicated target
A ::scroll-marker generated from an element indicates that originating element as its scroll target. The marker is not defined by its label or visual order.
Original worked example. Five markers map to cards A through E even after CSS reorders decorative labels. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Reverse the visible marker layout with styling. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Store marker-to-target identity and DOM origin. If this check fails, mark the claim unavailable and repair the method before continuing.
Change one consequential premise while keeping the rest fixed. Predict the new branch before inspecting it and preserve disagreement.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
4. Require generated content where applicable
A pseudo-element is generated under the conditions defined by its content and marker rules. A selector alone does not prove the control exists.
Original worked example. The marker content creates visible labelled controls in the test. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Set content:none and preserve all snap declarations. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Record computed content and generated-box evidence. If this check fails, mark the claim unavailable and repair the method before continuing.
Carry one plausible alternative through the state or geometry ledger, then choose the next observation that separates it from the leading account.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
5. Calculate current marker from position
The active-marker algorithm uses the scroller and target positions. It is more than a remembered click on a dot.
Original worked example. After script scrolls directly to card 4, marker 4 becomes current without activating marker 4. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Activate marker 2, then interrupt the scroll near card 3. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Record activation, intermediate offsets and final active marker. If this check fails, mark the claim unavailable and repair the method before continuing.
Name the document, node, root, pseudo-element, target, offset or event involved. Similar visible results can come from different platform paths.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
6. Separate :target-current from URL :target
The current-marker pseudo-class reflects scroll-marker state; URL fragment targeting is a different mechanism. Similar names must not collapse.
Original worked example. Marker 3 matches :target-current while the document fragment remains empty. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Navigate to #card-5 and compare both states. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Log URL fragment, :target match and :target-current match. If this check fails, mark the claim unavailable and repair the method before continuing.
Archive source, fixture, options, events, dimensions, browser version and raw exceptions so another reader can reproduce the conclusion.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
7. Compare links and tabs modes
Marker-group mode affects roles, activation and focus behavior. A visual row of dots is not enough to infer its mode.
Original worked example. A tabs-mode group follows tab-like focus behavior, while links mode preserves link-oriented behavior. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Keep the same styling and change only the group mode. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Inspect computed property, accessibility role and keyboard path. If this check fails, mark the claim unavailable and repair the method before continuing.
Keep method, object state and the final claim in separate fields so a matching visual result cannot rewrite platform evidence.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
8. Keep focus separate from current state
A marker can be current without holding focus, and a user can focus another marker before activation.
Original worked example. Marker 3 is current while keyboard focus rests on marker 4. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Activate marker 4 and then move focus to page content. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Record activeElement, focus pseudo-classes and current marker independently. If this check fails, mark the claim unavailable and repair the method before continuing.
Use a positive case, a clean negative case and an unavailable case. Unavailable evidence means the required field could not be established.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
9. Trace snap geometry separately
Snap alignment depends on the snapport, scroll padding, target snap area and scroll margin. None of those alone defines marker selection.
Original worked example. Card 2 aligns center after applying 24px scroll padding and 12px scroll margin. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Change scroll margin while leaving marker generation unchanged. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Save geometry and marker state as separate ledgers. If this check fails, mark the claim unavailable and repair the method before continuing.
Change one consequential premise while keeping the rest fixed. Predict the new branch before inspecting it and preserve disagreement.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
10. Handle between-position states
During a drag or smooth scroll, the scroller can sit between final snap positions. The draft’s active-marker calculation still needs its own evidence.
Original worked example. At 46 percent between cards 2 and 3, the observed current marker is recorded rather than guessed from the destination. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Reverse direction before settling. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Sample offset, target rectangles, current marker and pending snap state. If this check fails, mark the claim unavailable and repair the method before continuing.
Carry one plausible alternative through the state or geometry ledger, then choose the next observation that separates it from the leading account.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
11. Respond to layout changes
Images, fonts and container resizing can move targets and alter both snap geometry and active-marker calculation. Recompute rather than preserving a stale label.
Original worked example. A late image widens card 2 and changes target rectangles. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Give images intrinsic sizes from the start. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Record pre/post geometry, offset adjustment and marker result. If this check fails, mark the claim unavailable and repair the method before continuing.
Name the document, node, root, pseudo-element, target, offset or event involved. Similar visible results can come from different platform paths.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
12. Respect writing modes and axes
Marker order and snap movement must be interpreted in the scroller’s logical axes. Screen-left is not always inline-start.
Original worked example. The same carousel runs horizontal-tb and vertical-rl fixtures. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Change direction to rtl without changing DOM order. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Store writing mode, direction, axis and logical target order. If this check fails, mark the claim unavailable and repair the method before continuing.
Archive source, fixture, options, events, dimensions, browser version and raw exceptions so another reader can reproduce the conclusion.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
13. Test marker activation
Activating a marker scrolls toward its indicated target under the marker behavior. Activation does not prove that the target later remains current after interruption or layout change.
Original worked example. Marker 5 activation begins a smooth scroll that the user interrupts at card 4. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Let the same animation complete. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Record control activation, requested target, scroll sequence and final current marker. If this check fails, mark the claim unavailable and repair the method before continuing.
Keep method, object state and the final claim in separate fields so a matching visual result cannot rewrite platform evidence.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
14. Check keyboard and accessibility evidence
Generated markers are interactive controls with focus and accessible-name obligations. Visual dots without usable names or navigation are incomplete.
Original worked example. Markers use concise labels that identify slide purpose and expose tested keyboard order. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Remove generated text and inspect the accessibility tree. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Record role, name, focus order, target and mode. If this check fails, mark the claim unavailable and repair the method before continuing.
Use a positive case, a clean negative case and an unavailable case. Unavailable evidence means the required field could not be established.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
15. Repair common shortcuts
Current marker is not focused marker, snap target is not marker definition, activation is not completed scrolling, and :target-current is not URL :target.
Original worked example. A blinded event-and-style table asks readers to repair each claim. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Hide the screenshot and reason from state columns. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Require target mapping, offset, geometry, focus and mode. If this check fails, mark the claim unavailable and repair the method before continuing.
Change one consequential premise while keeping the rest fixed. Predict the new branch before inspecting it and preserve disagreement.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
16. Answer practical questions
Use markers when readers need visible position and direct navigation in a scroller, but provide robust fallback and do not conceal essential content.
Original worked example. A course carousel labels each lesson and remains scrollable when marker support is absent. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Change the carousel into a long article where ordinary headings and links are clearer. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Choose the control from reader navigation needs. If this check fails, mark the claim unavailable and repair the method before continuing.
Carry one plausible alternative through the state or geometry ledger, then choose the next observation that separates it from the leading account.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
17. Create a reproducible marker ledger
A useful test includes markup, computed styles, target map, positions, focus sequence and accessibility inspection.
Original worked example. The fixture exports exact-snap, between, interrupted and resized rows. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Repeat in links and tabs modes and two writing modes. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Version draft, browser, layout assets and observations. If this check fails, mark the claim unavailable and repair the method before continuing.
Name the document, node, root, pseudo-element, target, offset or event involved. Similar visible results can come from different platform paths.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
18. Use draft sources and continue
CSS Overflow Level 5 is evolving while Scroll Snap supplies a separate mature geometry model. Keep draft assertions dated and rerun changed algorithms.
Original worked example. The grouped route links existing snap-event and scrollend lessons as distinct jobs. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. When marker modes or active calculation change, rerun position, focus, activation and accessibility cases. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Save exact source anchors and access date. If this check fails, mark the claim unavailable and repair the method before continuing.
Archive source, fixture, options, events, dimensions, browser version and raw exceptions so another reader can reproduce the conclusion.
Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Grouped reading routes
Core route
Companion lessons
- Separating moveBefore() State Preservation from Remove-and-Reinsert Moves
- Separating getHTML() Shadow-Root Serialization from innerHTML
- Separating Scroll Button Availability from Scroll Overflow
Related specialist lessons
Sources and further study
CSS Overflow Module Level 5, scroll markers. Used for the standard definitions, material mechanisms or method limits developed in this lesson.
CSS Scroll Snap Module. Used for the standard definitions, material mechanisms or method limits developed in this lesson.
CSS Overflow Module Level 5. Used for the standard definitions, material mechanisms or method limits developed in this lesson.
The worked examples and transfer checks are developed here and state their own assumptions. The linked sources support the underlying web-platform mechanisms, state and method limits.
Return to contents · Return to The Gold Standard of Websites