Fixed
-
A preview no longer shakes when the sample is about as tall as the height cap. The
wrapper scrolls whatever is pastmax-height: 70vh, and a scrollbar arriving is a width
change, which is what the element refits on. A sample whose height follows its width —
anything with anaspect-ratio, a<video>above all — shortened by the scrollbar's
width, dropped back under the cap, lost the scrollbar, widened, grew past the cap again,
and went round for as long as it was on screen. Easiest to hit zoomed in or on a narrow
window, where a fixed-ratio sample sits nearest the cap..code-preview-viewportnow
carriesscrollbar-width: none: it still scrolls, and the scrollbar no longer costs it
any width to appear.The cost is stated rather than hidden. A sample past the cap now shows no scrollbar to
say there is more — the cut of its own content is the only sign — though wheel,
trackpad, keyboard and find-in-page all still reach it. Reserving a stable gutter was the
other way to hold the width still, and it charges an empty strip down the right of every
preview on the platforms that have scrollbars, including the great majority that never
reach the cap. On an engine withoutscrollbar-widththe scrollbar returns and so does
the shake, which is where this started rather than anywhere worse. Put it back for
yourself withcode-preview .code-preview-viewport { scrollbar-width: auto; }.
Full Changelog: v3.0.3...v3.0.4