Transform-based slide deck: hide scrollbar, true slide-by-slide nav#74
Open
hansjohn819-commits wants to merge 1 commit into
Open
Transform-based slide deck: hide scrollbar, true slide-by-slide nav#74hansjohn819-commits wants to merge 1 commit into
hansjohn819-commits wants to merge 1 commit into
Conversation
…de nav) All slides now live inside a single <div class="deck"> container. Navigation moves the deck via transform: translateY(-idx * 100vh) instead of scrolling. body is overflow: hidden so no scrollbar ever shows — the right-edge scrollbar in fullscreen presentation mode is a constant visual distraction. The feel becomes true slide-by-slide advancement rather than scrolling-that-snaps. A trackpad fine-scroll can no longer land between two slides. User-facing navigation is unchanged: arrow keys, space, mouse wheel, click slide, click nav dots all advance the active slide. Smooth between-slide motion is provided by a CSS transition on .deck, and is disabled under prefers-reduced-motion. Files changed: - viewport-base.css: html/body overflow hidden; new .deck rule with transition; removed scroll-snap-* and .slide scroll-snap-align; prefers-reduced-motion now also disables .deck transition. - html-template.md: body skeleton wraps slides in <div class="deck">; SlidePresentation controller rewritten to drive transform via goTo(); Intersection Observer replaced by a direct activate(idx) call that marks the active slide visible, updates dots and progress. - SKILL.md: Phase 5 navigation summary updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Two UX issues with the scroll-based deck during real presentations:
Scrollbar shows up in fullscreen. When presenting (F11), the
browser's right-edge scrollbar is a constant visual distraction —
it makes the page feel like "a webpage that scrolls" rather than
"slides advancing".
scroll-snap-typedoesn't hide it.Trackpad fine-scrolls can land between slides. Even with
scroll-snap-type: y mandatory, the visual feel is "scrolling thatsnapped" rather than "the next slide came in".
What changed
All slides now live inside a single
<div class="deck">container.Navigation moves the deck via
transform: translateY(-idx * 100vh)instead of scrolling.
bodyhasoverflow: hiddenso no scrollbarever shows. Smooth between-slide motion comes from a CSS
transitionon
.deck, and is disabled underprefers-reduced-motion.User-facing navigation is unchanged: arrow keys, space, mouse wheel,
click slide, click nav dots all advance the active slide.
Files
viewport-base.css—html/bodyoverflow: hidden; new.deckrule with transition; removedscroll-snap-*and.slidescroll-snap-align;prefers-reduced-motionnow also disablesthe deck transition.
html-template.md— body skeleton wraps slides in<div class="deck" id="deck">;SlidePresentationcontrollerrewritten to drive the transform via
goTo(). The oldIntersection Observer is replaced by a direct
activate(idx)callthat marks the active slide visible and updates dots / progress.
SKILL.md— Phase 5 navigation summary updated.Testing
.slide.visible .revealprefers-reduced-motion: reducedisables the deck transition