Replies: 1 comment
-
Submitted PR #4512. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Focus plugin
.noscroll
causes layout shift whenscrollbar-gutter
is set tostable
.That is because
.noscroll
adds apadding-right
to the size of the scrollbar, to prevent layout shift:alpine/packages/focus/src/index.js
Lines 201 to 204 in 28a2aa8
But when scrollbar-gutter is already set for the same reason, this causes a layout shift (essentially doubling the actual padding), in a failed attempt to prevent it.
I do not know what the best approach is, because
scrollbar-gutter
can be set on any element, but for this specific scenario, most of time, the property is set on thehtml
(document) element. So a possible solution could be to check for its existence:Beta Was this translation helpful? Give feedback.
All reactions