Open Bug 1508570 Opened 6 years ago Updated 2 years ago

Improve the design of scrollbar-color's fallback rendering (used on Linux)

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: fvsch, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

On Linux, scrollbar-color triggers a fallback scrollbar rendering which is basically made of two rectangles: track and thumb.

The main UX issue I'm seeing is that it can be hard to tell, as a user, which part is the track and which part is the thumb. See the attached screenshot:

1. On Windows, the thumb is inset 1px inside the track, or the track has a 1px padding or border, so the track always wraps the thumb visually.
2. On Linux, the track color matches the page background and it looks like the track's background is actually the thumb.

Do we have the ability to style this fallback design?
A 1px padding or border would help disambiguate things.
Yes, it is styleable internally. I believe you can change the style of scrollbars of Linux in toolkit/themes/windows/global/xulscrollbars.css

This file is shared between all non-Mac platforms, so we need to take care not to regress anything on Windows. But in generally it should be fine, as far as you only change restricted set of properties which are overridden when native theme is enabled. Those properties should include background and border, and probably padding as well.
At least nsITheme has DrawWidgetBackground, GetWidgetBorder, and GetWidgetPadding, so those three sets of properties should be pretty safe to use. You should definitely test on other platforms, though. (Custom scrollbar has a relatively strict regression test on number of pixels of different colors when scrollbar-color is used, that may catch the issue if you change the appearance, I suppose.)
Severity: normal → enhancement
Priority: -- → P3

Still an issue, and now an usability problem now that firefox no longer honours the layout.css.scrollbar-{color,width}.enabled = false property.

No longer blocks: 1460109
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: