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

[scroll area] Style hover + active state #1283

Open
oliviertassinari opened this issue Jan 3, 2025 · 0 comments
Open

[scroll area] Style hover + active state #1283

oliviertassinari opened this issue Jan 3, 2025 · 0 comments
Labels
component: scroll area design This is about UI or UX design, please involve a designer enhancement This is not a bug, nor a new feature

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Jan 3, 2025

Summary

The native scrollbar has come a long way:

is available in all browsers. Appearance can be animated to.

However, there still seem to be limitations with native scrollbar (could be content we add under https://base-ui.com/react/components/scroll-area to explain why this component exists in the first place when to use vs. using native CSS). I could find 4 (only?), by order:

  1. Hover and Active states can't be styled: [css-scrollbars] Scrollbar Hover/Interaction Colors w3c/csswg-drafts#10591
  2. macOS scrollbar is only visible on hover and doesn't work when the scrollbar is set to only become fully visible when scrolled [css-scrollbars] Force render scrollbar thumb of overlay scrollbars w3c/csswg-drafts#9785 (I'm not impacted by this).
  3. It's impossible to have a scrollbar that takes no width/height on all platform, like it does on macOS by default with a native scrollbar
  4. The scrollbar size can't be truly controlled, e.g. made bigger [css-scrollbars] Add thick value to scrollbar-width w3c/csswg-drafts#10650
  5. Have the scrollbar with custom shapes are impossible (why is this needed anyway?).

Now, because we don't show 1. in the demo (nor in code) it makes me feel like this component has little purpose. How about we update the demo to showcase 1. is solved?

In practice, it seems that we need to change the component's implementation:

  • hovering state isn't about when the scrollbar itself is hovered
  • there is no active state

Benchmark

Overall, I suspect that this component won't be needed in 2-3 years, the platform will fix this. So I don't know if we should spend time on this.

@oliviertassinari oliviertassinari added enhancement This is not a bug, nor a new feature design This is about UI or UX design, please involve a designer component: scroll area labels Jan 3, 2025
@oliviertassinari oliviertassinari changed the title [scroll area] Style active state [scroll area] Style hover + active state Jan 3, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Base UI Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: scroll area design This is about UI or UX design, please involve a designer enhancement This is not a bug, nor a new feature
Projects
Status: Backlog
Development

No branches or pull requests

1 participant