Bug 32388

Summary: Remove or rename overlay overflow values
Product: WebKit Reporter: Erik Arvidsson <arv>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: agafvv, bfulgham, hyatt, jchaffraix, simon.fraser, syoichi, tabatkins, tony, waleedsattar5, xfq.free, zalan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Description Erik Arvidsson 2009-12-10 11:54:17 PST
WebKit currently has a proprietary CSS overflow value called "overlay" which is undocumented and as far as I can tell from reading the code works exactly like "auto".

We should either remove it or rename it to "-webkit-overlay".
Comment 1 Tony Chang 2013-01-22 10:41:41 PST
Looks like hyatt tried to rename to -webkit-overlay in 2006: http://trac.webkit.org/changeset/14968 .  We should histogram and try again.
Comment 2 Tony Chang 2013-01-24 10:25:36 PST
10:05 < tony^work> dhyatt: What was overflow: overlay?
10:06 < tony^work> dhyatt: It looks like it's the same as overflow: auto now.
10:06 < dhyatt> a way for scrollbars to overlay the content instead of taking 
                up space
10:06 < dhyatt> now all scrollbars on OS X overlay content
10:06 < dhyatt> so on OS X at least it's not that relevant
10:06 < dhyatt> still applies to say Windows though

Looks like it used in a few places on the web (also in the WebKit Web Inspector).  Ojan says we should probably to try standardize it.
Comment 3 Julien Chaffraix 2013-01-24 10:43:20 PST
> Looks like it used in a few places on the web (also in the WebKit Web Inspector).  Ojan says we should probably to try standardize it.

I am pretty sure I asked about removing it at some point last year, the answer was that it was used internally by Apple (I can't recall the exact wording and lost my logs of this conversation). It may also make sense for mobile as overflow: overlay scrollbars don't trigger a layout.
Comment 4 Tab Atkins 2013-01-24 11:02:41 PST
Okay, so it's identical to "auto" in behavior, but just forces the scrollbars (if created) to be overlay rather than space-filling?

This sounds like an okay kind of thing to standardize, and I can try to do so if my above description is correct.
Comment 5 Tony Chang 2013-01-24 11:32:20 PST
(In reply to comment #4)
> Okay, so it's identical to "auto" in behavior, but just forces the scrollbars (if created) to be overlay rather than space-filling?

Yes, that's right.  Here's an example: http://jsfiddle.net/rNxgD/ .
Comment 6 Simon Fraser (smfr) 2015-12-24 12:57:30 PST
I wonder if we can try to make it -webkit again, or remove it.
Comment 7 Chris Rebert 2016-01-31 05:40:13 PST
There's talk of standardizing some variation of this:
https://github.com/w3c/csswg-drafts/issues/92
Comment 8 Fuqiao Xue 2017-12-19 18:18:09 PST
CSSWG standardized this behavior by add a scrollbar-gutter property:

* https://drafts.csswg.org/css-overflow-4/#scollbar-gutter-property
* https://github.com/w3c/csswg-drafts/issues/92#issuecomment-272567887
Comment 9 Simon Fraser (smfr) 2018-09-20 17:56:47 PDT
I'm making 'overlay' a synonym for 'auto': bug 189811. I'd prefer to remove it, but that causes sites that use it to fall back to overflow:auto, which would be a breaking behavior change.
Comment 10 Brent Fulgham 2022-07-12 12:46:46 PDT
We can revisit removing 'overlay' entirely once the web has moved on.