Skip to content
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

Scrollbar is invisible in the Drawer #2308

Open
ross-nordstrom opened this issue Dec 7, 2024 · 0 comments
Open

Scrollbar is invisible in the Drawer #2308

ross-nordstrom opened this issue Dec 7, 2024 · 0 comments
Labels
bug Things that aren't working right in the library.

Comments

@ross-nordstrom
Copy link

ross-nordstrom commented Dec 7, 2024

Describe the bug

When the drawer has overflow, the scrollbar is hidden. You can see it on the docs page (https://shoelace.style/components/drawer) if you fill the drawer with enough content to need scroll.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://shoelace.style/components/drawer
  2. Click Open Drawer from the first example (or any example)
  3. Edit the text in the drawer and add a bunch to make it require scroll
  4. Try to visually see an indication that the drawer can scroll
    🐞 There's no visible scrollbar

Demo

--

Screenshots

chrome_OxzAtpB3Uz

Browser / OS

  • OS: Windows
  • Browser: Chrome
  • Browser version: 131.0.6778.86

Workaround

This has to do with shoelace's scrollbar-gutter logic, which I haven't fully grokked, but an ugly fix (because there's still a random blank, the color of the base page) is to add margin to the drawer to reveal the scrollbar hidden under the gutter:

html.sl-scroll-lock sl-drawer::part(body) {
    margin-right: var(--sl-scroll-lock-size);
}

image

@ross-nordstrom ross-nordstrom added the bug Things that aren't working right in the library. label Dec 7, 2024
@claviska claviska pinned this issue Dec 12, 2024
@claviska claviska unpinned this issue Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things that aren't working right in the library.
Projects
None yet
Development

No branches or pull requests

1 participant