A centred page can shift sideways when a short view becomes long enough to need a vertical scrollbar. The content has not changed its alignment rule; the available width has changed. Reserving scrollbar space can prevent that particular movement before it happens.
MDN’s scrollbar-gutter reference describes the CSS property that controls this reservation. For a scrolling panel, a small starting example is .results { overflow: auto; scrollbar-gutter: stable; }. With classic scrollbars, the stable gutter keeps the relevant space available even when the content does not currently overflow.
Test the element that actually scrolls
A common mistake is to apply the property to a decorative wrapper while a different element owns the scrolling area. In developer tools, identify the scroll container first. Then compare the same panel with a short result list and a long one. Its content should not need an arbitrary extra padding value just to imitate scrollbar width.
The both-edges keyword, used with stable, can reserve matching space on the opposite inline edge when a gutter is present. That can help a design whose internal content needs visual symmetry. It is not necessary for every panel.
Account for the user’s scrollbar style
Overlay scrollbars behave differently because they sit over the content instead of consuming a permanent strip of layout space. The property does not force an overlay scrollbar to become a classic one. Test the operating-system and browser combinations that matter to the site rather than judging the result on one laptop.
Check keyboard scrolling, focus visibility and narrow layouts too. Reserving space should not hide a horizontal-overflow problem or replace an accessible scrolling interaction.
Keep the before-and-after comparison focused: short content, long content, same viewport and same container. If the sideways shift disappears under classic-scrollbar conditions, you have addressed a specific cause instead of covering it with a layout adjustment that may fail elsewhere.

