Intent to ship: limited ::-webkit-scrollbar support

45 views
Skip to first unread message

Hiroyuki Ikezoe

unread,
Mar 25, 2026, 6:26:06 PM (yesterday) Mar 25
to dev-platform
I intend to ship limited support for the ::-webkit-scrollbar pseudo-element
 is relevant

This feature is non-standard, but it is a widely-used legacy feature by
both Chrome and Safari. The CSS Scrollbars spec's Interaction with
non-standard features section acknowledges it and specifies how standard
scrollbar-width should take precedence over it.

What we are implementing

We are implementing a minimal, targeted subset of ::-webkit-scrollbar
to fix real-world webcompat issues:

1. ::-webkit-scrollbar rules with a non-zero width or height value
  will disable overlay scrollbars for that scroll container.
2. ::-webkit-scrollbar { display: none } will be treated equivalently
  to scrollbar-width: none, hiding scrollbars.
3. @supports selector(::-webkit-scrollbar) will evaluate to true,
  since we now parse and partially respond to the syntax.

We are explicitly not implementing the full ::-webkit-scrollbar
styling API (colors, border-radius, thumb/track sub-parts,
etc.).

Webcompat evidence

Bug 1836872 - Google site relies on ::-webkit-scrollbar to produce non-overlay scrollbars
Bug 1973196 - Gmail nested scroll containers are unreachable due to overlay scrollbars not being suppressed
Bug 2016775 - Slack shows double-stacked scrollbars because ::-webkit-scrollbar { display:none } is not respected

--
hiro

Mike Taylor

unread,
10:05 AM (9 hours ago) 10:05 AM
to Hiroyuki Ikezoe, dev-platform

On 3/25/26 6:25 p.m., 'Hiroyuki Ikezoe' via dev-pl...@mozilla.org wrote:

I intend to ship limited support for the ::-webkit-scrollbar pseudo-element
 is relevant

This feature is non-standard, but it is a widely-used legacy feature by
both Chrome and Safari. The CSS Scrollbars spec's Interaction with
non-standard features section acknowledges it and specifies how standard
scrollbar-width should take precedence over it.

What we are implementing

We are implementing a minimal, targeted subset of ::-webkit-scrollbar
to fix real-world webcompat issues:

1. ::-webkit-scrollbar rules with a non-zero width or height value
  will disable overlay scrollbars for that scroll container.
2. ::-webkit-scrollbar { display: none } will be treated equivalently
  to scrollbar-width: none, hiding scrollbars.
3. @supports selector(::-webkit-scrollbar) will evaluate to true,
  since we now parse and partially respond to the syntax.

We are explicitly not implementing the full ::-webkit-scrollbar
styling API (colors, border-radius, thumb/track sub-parts,
etc.).

This is really useful - if someone would like to send a PR in the compat standard, I would be happy to review. See also https://github.com/whatwg/compat/issues/61


Webcompat evidence

Bug 1836872 - Google site relies on ::-webkit-scrollbar to produce non-overlay scrollbars
Bug 1973196 - Gmail nested scroll containers are unreachable due to overlay scrollbars not being suppressed
Bug 2016775 - Slack shows double-stacked scrollbars because ::-webkit-scrollbar { display:none } is not respected

--
hiro
--
You received this message because you are subscribed to the Google Groups "dev-pl...@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev-platform...@mozilla.org.
To view this discussion visit https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/CADeQTotTmK2_kdiRTq_QbKtw7M%3D7Mf-ks83T1Oq0T6MgrFo6PA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages