Closed Bug 1521631 Opened 6 years ago Closed 2 years ago

Implement overflow:overlay (non-standard)

Categories

(Core :: CSS Parsing and Computation, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
110 Branch
Webcompat Priority P3
Tracking Status
firefox66 --- wontfix
firefox110 --- fixed

People

(Reporter: twisniewski, Assigned: jwatt)

References

()

Details

(Keywords: webcompat:platform-bug)

Attachments

(3 files)

It seems that according to this Webkit bug, overflow:overlay was once a (non-standard) value that is now treated as an alias for overflow:auto. In Firefox, using the value just results in no scrollbars appearing, which has just surfaced as an interop issue on webcompat.com for RedBubble's site.

If it really is just an alias, I suspect it would be worth adopting it for compat's sake as part of the Compatibility standard.

Flags: webcompat?
Assignee: nobody → jwatt
Priority: -- → P2

Quoting from Phabricator:

Hmm, so this looks more complicated than this. Blink also makes scrollbars not take layout space when overflow: overlay is specified:

https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/layout/layout_box.cc?l=977&rcl=c16c4e3c6a08c6c9cc4178415ac28889d78ffb1a

WebKit can get away with aliasing it to auto because mac always has overlay scrollbars. But we don't.

So this does not look so simple... Or am I missing something?

Flags: needinfo?(twisniewski)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)

WebKit can get away with aliasing it to auto because mac always has overlay scrollbars. But we don't.

That...is a very good point.

Ah, yes, now that I've tested it again it seems that Chrome is also actually overlaying the scrollbars. My apologies for not checking more thoroughly.

Flags: needinfo?(twisniewski)

Just a note that the site this was reported against has fixed their site.

Whiteboard: [webcompat] → [webcompat][webcompat-revisit]

Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.

Webcompat Priority: --- → ?

See bug 1547409. Migrating whiteboard priority tags to program flags.

Webcompat Priority: ? → revisit
Flags: webcompat?
Whiteboard: [webcompat][webcompat-revisit]
Blocks: 1556512

(Gonna bump this to a P3 because the Bing COVID stuff is relying on it, but it doesn't affect release because they're using @-moz-document url-prefix as a workaround)

Webcompat Priority: revisit → P3

I have multiple pages that use the same template, some pages are longer than the browser window's height, while other's aren't. The ones that are longer get pushed to the left by about 10px.
overflow: overlay solves this, but sadly this doesn't work in Firefox. MDN web doc's suggests not to use it https://developer.mozilla.org/en-US/docs/Web/CSS/overflow . Can this functionality be added to Firefox or can you guys suggest an alternate method to solve the above problem :(
https://stackoverflow.com/questions/8543664/overflow-overlay-doesnt-work-in-firefox
https://stackoverflow.com/questions/4297817/stop-scrollbar-from-pushing-content-left

Do you have a test-case that you could attach to the bug? overflow-y: scroll should make sure stuff doesn't shift (by showing the scrollbar all of the time).

If you don't want that, depending on what you exactly want overflow-y: auto; overflow-x: hidden with width: 100vh on the child accomplishes effectively what overlay does. Or maybe something more on the lines of keeping overflow-y: scroll; but effectively hiding the scrollbars with scrollbar-color: transparent transparent may be better so that content doesn't go under the scrollbar? If you're doing some kind of scrollbar-on-hover effect that's much better.

In any case per the discussion on the phab revision this is not just a simple matter of aliasing.

Summary: Implement overflow:overlay (non-standard) as an alias of overflow:auto → Implement overflow:overlay (non-standard)

Thanks, Emilio. overflow-y: scroll and scrollbar-color: aqua transparent worked for me.

It will be a useful feature for the web scrollbars I have described the use case here: https://github.com/w3c/csswg-drafts/issues/6262

Super simple test case following a webcompat discussion.

Severity: normal → S3
Flags: needinfo?(jwatt)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/51b8acb7ac3f Implement overflow: overlay as an alias on auto, and enable on Nightly. r=boris
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
Blocks: 1809851
Flags: needinfo?(jwatt)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: