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

Custom scrollbars in the admin frame #12533

Open
sophschneider opened this issue Aug 9, 2024 · 0 comments
Open

Custom scrollbars in the admin frame #12533

sophschneider opened this issue Aug 9, 2024 · 0 comments
Labels
#gsd:38420 Top bar and global reframe project

Comments

@sophschneider
Copy link
Contributor

Should we keep using native scrollbars for the admin frame?

Current the scrollbar thumb is cut off in the admin because of the frame's rounded corners. To fix this, we would have to reposition the scrollbar track by adding some margins, something like:

&::-webkit-scrollbar {
      width: 7px;
    }

    &::-webkit-scrollbar-track {
      background: transparent;
      margin-top: 6px;
      margin-right: 4px;
      margin-bottom: 6px;
    }

    &::-webkit-scrollbar-thumb {
      background: #888;
      border-radius: 10px;
    }

    &::-webkit-scrollbar-thumb:hover {
      background: #888;
      border-radius: 10px;
    }

But this means using a webkit custom scrollbar implementation. This can be problematic because

  • it is not well supported and not standard, doesn't work on firefox
  • does not respect user's scrollbar OS settings (scrollbars set to always or when scrolling)
  • doesn't come with future native scrollbar updates that browsers release
  • cannot be used in combination with scrollbar-color and scrollbar-width properties

If we do implement our own webkit scrollbars we would have to tophat the following cases

Browser With scrollbar always With scrollbar while scrolling
Chrome - -
Firefox *Can't use webkit, maybe conditionally add scrollbar-color styles? - -
Safari - -
Edge - -

We should also make sure to transition/animate hover states and scrolling states, and also make sure that the styles are sharable to other scroll containers in the admin (maybe implement this within Scrollable?)

@sophschneider sophschneider added the #gsd:38420 Top bar and global reframe project label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#gsd:38420 Top bar and global reframe project
Projects
None yet
Development

No branches or pull requests

1 participant