Contact emails [email protected] <mailto:[email protected]>
Explainer https://github.com/felipeerias/css-scrollbars-explainer Specification https://www.w3.org/TR/css-scrollbars-1 Summary The CSS Scrollbars spec allows authors to style scrollbars by specifying their colors and thickness. This spec adds the following two properties. The scrollbar-color property provides the capability of changing the color scheme of scrollbars so they fit better into the particular style of a web page. The scrollbar-width property allows the use of narrower scrollbars that may be more suitable for some use cases, or even to hide the scrollbars completely without affecting scrollability. Blink component Blink>Layout>Scrollbars <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3ELayout%3EScrollbars> Search tags css <https://chromestatus.com/features#tags:css>, scrollbars <https://chromestatus.com/features#tags:scrollbars>, scrollbar-color <https://chromestatus.com/features#tags:scrollbar-color>, scrollbar-width <https://chromestatus.com/features#tags:scrollbar-width> TAG review https://github.com/w3ctag/design-reviews/issues/563 TAG review status Issues addressed Risks Interoperability and Compatibility These are already supported inside of Firefox so shouldn't present much of a risk. It's possible that if Safari doesn't support them this could lead to some level of fragmentation between the legacy pseudo styles and the standard properties. Gecko: Shipped/Shipping (https://bugzilla.mozilla.org/show_bug.cgi?id=1460109) Firefox fully supports both properties. WebKit: Positive (https://github.com/WebKit/standards-positions/issues/133) A supportive position has been given for both scrollbar-width and scrollbar-color. See also https://github.com/WebKit/standards-positions/issues/134 Web developers: Positive (https://insights.developer.mozilla.org <https://insights.developer.mozilla.org/>) "Inability to style browser scrollbars" included in the list of Top Pain Point Categories of the MDN Browser Compatibility Report. Other signals: Ergonomics The value of scrollbar-width influences other properties such as scrollbar-gutter which take the scrollbar's thickness as reference. There might be conflicts between these properties and Chromium's own ::-webkit-scrollbar pseudo-elements that serve a similar purpose. This is partially addressed by these standard properties taking precedence inside of Chromium and WebKit. Activation These properties are easy for developers to take advantage of many will already be using them for Firefox support. WebView application risks Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications? This should have no impact on WebView applications. It will simply allow customising the colours of scrollbars if they apply the necessary styles. Debuggability Both properties will show up in dev tools with auto complete support. Scrollbar color will also have the color swatch show up for both values. Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)? Yes Is this feature fully tested by web-platform-tests <https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>? No The existing Web Platform Tests are not exhaustive. Internal tests are implemented where necessary. Results: https://wpt.fyi/results/css/css-scrollbars Flag name on chrome://flags #enable-experimental-web-platform-features Finch feature name ScrollbarColor and ScrollbarWidth Requires code in //chrome? False Tracking bug https://bugs.chromium.org/p/chromium/issues/detail?id=891944 Availability expectation Expect scrollbar-width to be available across all browsers within a year. scrollbar-color requires platform changes for WebKit on Apple platforms so may take longer to be available. Adoption expectation I expect these standard properties be the default way developers choose to style both colouring and sizing of scrollbars, replacing the legacy webkit pseudo styles for most developers. Sample links https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-color https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-width Estimated milestones Shipping on desktop 121 DevTrial on desktop 118 Shipping on Android 121 DevTrial on Android 118 Shipping on WebView 121 Anticipated spec changes Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way). No anticipated spec changes, this is already shipping in Firefox for a long time. Link to entry on the Chrome Platform Status https://chromestatus.com/feature/5665308343795712 Links to previous Intent discussions Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/zwG2m_KG0RY/m/8nEx9wCWAwAJ This intent message was generated by Chrome Platform Status <https://chromestatus.com/>. -- You received this message because you are subscribed to the Google Groups "blink-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/274EE63B-2E80-4B9E-BE10-6615DDF2A508%40gmail.com.
