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.
What you will learn
By the end of this chapter- 01Find the likely cause of a common scroll fault from its symptom.
- 02Apply the fix, then confirm it with the same check that showed the fault.
- 03Look up the terms used across the course.
01 · Troubleshooting
Symptom, cause, fix| Symptom | Likely cause | Fix |
|---|---|---|
| Smooth scroll does nothing | No doctype, so the browser is in quirks mode | Start the file with <!doctype html> |
| Two scrollbars or a jump | overflow: hidden on html or body | Use overflow-x: clip on body |
| Sticky section never sticks | An ancestor has overflow set | Remove it, or use clip |
| Gallery ends early or late | Width measured before fonts loaded | Measure again in document.fonts.ready and on resize |
| Content stays invisible | Class name mismatch, or threshold too high for a tall element | Check the class, lower the threshold |
| Anchor links jump | Native jump fights Lenis | Call lenis.scrollTo(target) |
| Trigger positions are wrong | Images loaded after GSAP measured | Call ScrollTrigger.refresh() on load |
| Choppy on a phone | Animating top, left or width | Animate transform and opacity only |
| Hero text pushed off screen | Parallax offset too large on small widths | Lower the speed or the layer inset on narrow screens |
| Pinned section jumps or leaves a gap | A transformed or filtered ancestor, or two pins on one element | Pin one section at a time, outside transformed parents |
| A blank WebGL canvas | No WebGL on this computer, or the renderer created twice | Create it once inside try and show a fallback |
| Animations never play on one computer | The system asks for reduced motion | Check 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.