layout shift
Visible content unexpectedly moving position on the page, for example when a font loads or an element resizes.
In more detail
Layout shifts disorient users and cause mis-clicks. In testing, a shift that nobody intended is a visual regression that DOM-based unit tests cannot see.
Related terms
- visual regression testing — Testing that takes screenshots of components and compares them pixel by pixel with approved baseline images to catch unintended visual changes.
- web font — A font file downloaded by the page, declared with @font-face, instead of one already installed on the user's device.
- responsive breakpoint — A screen width at which a layout or font size changes, set with a CSS media query.
Taught in
- Typography & Spatial Grids: Modular Scales & Fluid Typography — Design Systems & Component Engineering
- Visual Contrast Auditing: Color Blindness & Reduced Motion — Design Systems & Component Engineering
- Visual Regression Testing: Playwright & Snapshot Differencing — Design Systems & Component Engineering