Scrollcraft
Chapter 15 of 15RO

Reference: faults and terms.

Come back here when something breaks or a word is unfamiliar. Each fault has its likely cause and a fix; each term has a one-line definition.

Chapter 15 of 152 min read

What you will learn

By the end of this chapter
  1. 01Find the likely cause of a common scroll fault from its symptom.
  2. 02Apply the fix, then confirm it with the same check that showed the fault.
  3. 03Look up the terms used across the course.

01 · Troubleshooting

Symptom, cause, fix
SymptomLikely causeFix
Smooth scroll does nothingNo doctype, so the browser is in quirks modeStart the file with <!doctype html>
Two scrollbars or a jumpoverflow: hidden on html or bodyUse overflow-x: clip on body
Sticky section never sticksAn ancestor has overflow setRemove it, or use clip
Gallery ends early or lateWidth measured before fonts loadedMeasure again in document.fonts.ready and on resize
Content stays invisibleClass name mismatch, or threshold too high for a tall elementCheck the class, lower the threshold
Anchor links jumpNative jump fights LenisCall lenis.scrollTo(target)
Trigger positions are wrongImages loaded after GSAP measuredCall ScrollTrigger.refresh() on load
Choppy on a phoneAnimating top, left or widthAnimate transform and opacity only
Hero text pushed off screenParallax offset too large on small widthsLower the speed or the layer inset on narrow screens
Pinned section jumps or leaves a gapA transformed or filtered ancestor, or two pins on one elementPin one section at a time, outside transformed parents
A blank WebGL canvasNo WebGL on this computer, or the renderer created twiceCreate it once inside try and show a fallback
Animations never play on one computerThe system asks for reduced motionCheck the setting; respect it, and offer an opt-in

02 · Glossary

Twelve terms
Lerp
Linear interpolation. Each frame, move a fixed fraction of the remaining distance to the target.
Easing
The curve that sets how fast something moves at each point in its journey.
Pinning
Holding an element in place while the page scrolls past it. In CSS this is usually position: sticky.
Scrub
Tying an animation’s progress to scroll position instead of time.
Parallax
Layers moving at different speeds, which the eye reads as depth.
Quirks mode
A legacy rendering mode a browser uses when the doctype is missing.
Layout thrash
Reading layout values and writing styles in a loop, which forces repeated recalculation.
Composited layer
A layer the GPU can move without redoing layout or paint. Transform and opacity changes usually qualify.
Design token
A named value, such as a colour, size or duration, that every component reads instead of a raw number.
Shader
A small program that runs on the graphics card, once per vertex or once per pixel.
Core Web Vitals
Three measures of how a page feels: loading (LCP), responsiveness (INP) and visual stability (CLS).
Progressive enhancement
Building the page so it works in full without scripts or effects, then adding them on top.

Back to the start

Keyboard shortcuts: [ previous chapter