Intent to implement: Scrollbar color properties

Summary: 
Two CSS properties scrollbar-{face,track}-color to style scrollbars in a color by author.

These properties intends to provide a more restricted feature set for controlling scrollbar styling than ::-webkit-scrollbar-* pseudo-elements shipped in WebKit and Blink, so that authors can get native scrollbars while still have some styling fitting their pages. 

There is a consensus in the CSS working group that the existing pseudo-element API is too powerful, and since scrollbar is an evolving technology, we want to provide a restricted API to give users a native experience while allowing authors to customize to some extent.

Hopefully with these properties (and one another controlling scrollbar width or style to fulfill thin scrollbar usecases), WebKit and Blink would be able to unship their current pseudo-elements, so that we wouldn't need to implement them to get web compatible.


Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1460456

Link to standard: https://drafts.csswg.org/css-scrollbars-1/#scrollbar-color-properties

Platform coverage: Desktop

Estimated or target release: maybe Firefox 63 or 64

Preference behind which this will be implemented: "layout.css.scrollbar-colors.enabled"

Is this feature enabled by default in sandboxed iframes? Yes.
If not, is there a proposed sandbox flag to enable it? N/A
If allowed, does it preserve the current invariants in terms of what sandboxed iframes can do? It's a rendering feature which sandboxed iframes can always be simulated with existing rendering features.

DevTools bug: just some color properties, no need specific devtools support?

Do other browser engines implement this? Answer with: mixed signal. We would go through the CSS working group and ensure other browser engines are happy with them before shipping.

web-platform-tests: There are some web-platform-tests in https://github.com/web-platform-tests/wpt/tree/master/css/css-scrollbars
The main rendering of this bug is not testable because scrollbars are very platform-dependent, and rendering it like the platform natives is a large point of the properties.

Secure contexts: It's not clear. Probably no because it is a rendering feature which can always be simulated with existing features.


Also note that, DevTools has been using the properties for dark mode and gave positive feedback of them on platforms which they have been available.
0
Xidorn
7/9/2018 1:24:22 AM
mozilla.dev.platform 6420 articles. 0 followers. Post Follow

0 Replies
4 Views

Similar Articles

[PageSpeed] 2

Reply: