Fix x-trap.noscroll layout shift conflict with scrollbar-gutter#4512
Open
dotfrag wants to merge 1 commit intoalpinejs:mainfrom
Open
Fix x-trap.noscroll layout shift conflict with scrollbar-gutter#4512dotfrag wants to merge 1 commit intoalpinejs:mainfrom
dotfrag wants to merge 1 commit intoalpinejs:mainfrom
Conversation
55909e8 to
4dc5cbe
Compare
Contributor
|
Initial and unset shouldn't impact "get computed style" since that will find what the actual applied value is, not what an elements literal setting is. |
Author
|
Ah yes that's true! |
|
I would really like this to be merged. I'm using |
Author
As a temporary workaround you can use the patch tool, i.e. |
Thanks, I didn't know this was possible, I've been forking all this time! |
|
Why this fix was not already merged? As a temporary workaround I'm doing this: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If
scrollbar-gutteris set to something other than the initial value 'auto' (e.g. 'stable'), do not modify padding-right. See issue #4511.This is my attempt to fix it, hoping it's heading to the right direction. I'm using it in my app and it's working. Feel free to discard/modify as you like.
EDIT: Does not appear to work reliably in all cases. I'm trying to understand why, otherwise I'll close it. Fixed, checking the failed test now.Tested and seems to be working:
scrollbar-gutterundefined =>overflow: hidden; padding-right: 15px;scrollbar-gutterunchanged (defaults to 'auto') =>overflow: hidden; padding-right: 15px;scrollbar-gutter: stable=>overflow: hidden;scrollbar-gutter: stable both-edges=>overflow: hidden;Ready for review.
Caveat: scrollbar-gutter, like many other CSS properties supports the global values inherit/revent/etc... which I'm not accounting for. I believe these are really edge-cases. If you want to check for those, then the if check must be explicit (i.e. check for 'stable' and 'stable both-edges') and the return statements reversed.