-
Notifications
You must be signed in to change notification settings - Fork 959
fix(dialog): scrollbar Flash on opening #5121 #5802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -173,7 +173,7 @@ | |
// space from appearing on platforms that reserve scrollbar space. | ||
// Note: we only scroll vertically. Horizontal scrolling should be handled | ||
// by the content. | ||
overflow-y: scroll; | ||
overflow-y: auto; | ||
} | ||
|
||
.content { | ||
|
@@ -185,6 +185,7 @@ | |
font-weight: map.get($tokens, 'supporting-text-weight'); | ||
height: min-content; // Needed for Safari | ||
position: relative; | ||
overflow-y: clip; // Needed for .scrollable .scroller | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not too sure on that actually... .content overflows when scroller is set to auto, so this prevents that. This would make more sense in a .scrollable > .content but as mentioned above ill go do this in js |
||
} | ||
|
||
slot[name='content']::slotted(*) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, this works by not forcing the scrollbar to show (
auto
vsscroll
) if we detect overflowing content in JS and add the.scrollable
class?What is the advantage to this solution as opposed to addressing the issue in JS that results in an inaccurate toggling of the
.scrollable
class?For example, toggling the class after open animations have settled as suggested in #5121 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you understand correctly.
I suppose ive always been drilled on doing css over js but I can see your point, especially since there are open and close methods already.
Will do this in js 👍