Intent to implement: Scrollbar color properties

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.


Link to standard:

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
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.
7/9/2018 1:24:22 AM 6420 articles. 0 followers. Post Follow

0 Replies

Similar Articles

[PageSpeed] 2