patternfly-design icon indicating copy to clipboard operation
patternfly-design copied to clipboard

Scrollbar - transparent track

Open nicolethoen opened this issue 1 year ago • 1 comments

The corners of the scroll bar look odd beside the rounded corner of page sections.

Screenshot 2024-05-29 at 4 57 39 PM

Screenshot 2024-05-29 at 4 57 31 PM

It doesn't seem we are updating the color of the scrollbar in dark theme like we were in PF5. Were we using color-theme: dark or something similar before that we are no longer using?

We could update the track color of the scrollbar using css scrollbar-color. This issue is especially obvious in Fedora machines. We should also check the browser compatibility of the scrollbar-color style.

nicolethoen avatar May 29 '24 21:05 nicolethoen

We updated the dark theme scrollbar color, but we need to move the scrollbar to an element with a border radius to have the scrollbar round on the edges with the parent container. I wonder if this can be addressed in https://github.com/patternfly/patternfly/issues/6712? cc @evwilkin

mcoker avatar Jun 20 '24 19:06 mcoker

Design refinements to improve scrollbar appearances in v6: 
 Here are several [hopefully small] adjustments to our page/sidebar components that should help with the appearance of scrollbars in v6: 



  • [Transparent track as mentioned above if possible]
  • Reduce the page border radius to border—radius—medium so the curve doesn't look as awkward cutting off the scrollbar. Placing within an element that can get a border radius might still help here @mcoker)
  • Reduce the border around the content area to global—spacer—xs, 4px(it was 8px before)
  • Adjust the nav scrollbar to have padding to its right so that it is centered between left nav and page body

With adjustments listed above: image

Current state: image

These adjustments should also help https://github.com/patternfly/patternfly/issues/6834

Wdyt @nicolethoen @andrew-ronaldson @mcoker @thatblindgeye?

lboehling avatar Sep 11 '24 19:09 lboehling

@lboehling nice! Put those together along with the scrollbar thumb/track update in https://github.com/patternfly/patternfly/pull/7068.

I set the scrollbar thumb color to our border--color--default token, and set the track to transparent, and am only applying those styles to the main container and sidebar. Other things that scroll don't have that update, but could.

FWIW here's a screenshot without the scrollbar color updates, if you want to see what that looks like.

Screenshot 2024-09-11 at 8 39 43 PM

mcoker avatar Sep 12 '24 01:09 mcoker

@lboehling with https://github.com/patternfly/patternfly/pull/7101, can we close this issue?

mcoker avatar Sep 25 '24 17:09 mcoker

Closed by https://github.com/patternfly/patternfly/pull/7101

andrew-ronaldson avatar Oct 08 '24 15:10 andrew-ronaldson