WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
267085
overflow: hidden prevents CSS Subgrid
https://bugs.webkit.org/show_bug.cgi?id=267085
Summary
overflow: hidden prevents CSS Subgrid
Darius Cepulis
Reported
2024-01-04 08:50:48 PST
Applying `overflow: hidden` to an element that also has `display: grid; grid-template-rows: subgrid` will result in the element acting as though it doesn't have subgrid applied... unlike in Firefox and Chrome where subgrid behaves as expected. Reproduced here:
https://codesandbox.io/p/sandbox/zen-rhodes-mbse3s?file=%2FApp.svelte
Marked this as Safari 17, but I've confirmed that it exists in Technology Preview (Release 185 (Safari 17.4, WebKit 19618.1.9.8)) too. Marked this as macOS 14 but I've observed this on macOS 13, iOS/iPadOS 16, and iOS/iPadOS 17 as well. ... Cards with rounded corners and overflow hidden are a [big element of our design on mux.com](
https://share.cleanshot.com/pJD9nrFX
), so I've been dying to use subgrid for a while. Unfortunately, this bug is preventing me from rolling it out, even behind a @supports flag, since I know it'll layout incorrectly on Safari. Let me know if there's more I can provide! Y'all are the best. Thanks for making the best browser engine ;)
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-01-11 08:51:14 PST
<
rdar://problem/120848131
>
Sammy Gill
Comment 2
2024-01-16 16:17:58 PST
I think the issue is that RenderElement::establishesIndependentFormattingContext() returns true if hasPotentiallyScrollableOverflow() returns true, but we also need to make sure that the box is a block box before we do that. The spec says: If the computed value of overflow on a block box is neither visible nor clip nor a combination thereof, it establishes an independent formatting context for its contents.
https://drafts.csswg.org/css-overflow-3/#overflow-control
Sammy Gill
Comment 3
2024-01-16 18:04:33 PST
Pull request:
https://github.com/WebKit/WebKit/pull/22845
Sammy Gill
Comment 4
2024-01-17 09:52:25 PST
Submitted web-platform-tests pull request:
https://github.com/web-platform-tests/wpt/pull/44050
EWS
Comment 5
2024-01-17 11:08:31 PST
Committed
273134@main
(78a954e5a2bd): <
https://commits.webkit.org/273134@main
> Reviewed commits have been landed. Closing PR #22845 and removing active labels.
Sammy Gill
Comment 6
2024-02-07 15:14:15 PST
***
Bug 268539
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug