RESOLVED FIXED 251909
table element 'overflow:clip' is not applied to nested table elements (thead, tr, td, etc) with a background-color
https://bugs.webkit.org/show_bug.cgi?id=251909
Summary table element 'overflow:clip' is not applied to nested table elements (thead,...
Pierre Ossman
Reported 2023-02-08 01:50:18 PST
Created attachment 464905 [details] Test case If a table has "overflow: clip;", then Chrome and Firefox both clip the contents of the table to the shape of the table. This is very useful when you want a table with round corners. Unfortunately, WebKit does not, giving sharp edges for elements that have a non-transparent background. Tested using Safari on iOS, and Epiphany on Linux.
Attachments
Test case (545 bytes, text/html)
2023-02-08 01:50 PST, Pierre Ossman
no flags
safari, firefox, chrome (64.06 KB, image/png)
2023-02-08 23:46 PST, Karl Dubost
no flags
rendering with outlines (12.68 KB, image/png)
2023-02-08 23:53 PST, Karl Dubost
no flags
Pierre Ossman
Comment 1 2023-02-08 01:52:11 PST
It is possible to work around this using some ugly CSS like: tr:last-child td:last-child { border-bottom-right-radius: 10px; } But it quickly becomes ugly when considering variations on <thead>, <tbody> and <tfoot>.
Karl Dubost
Comment 2 2023-02-08 23:46:33 PST
Created attachment 464917 [details] safari, firefox, chrome Rendering in Safari TP, Firefox Nightly, Chrome Canary latest versions
Karl Dubost
Comment 3 2023-02-08 23:53:14 PST
Created attachment 464918 [details] rendering with outlines putting a yellow outline on the table element and a red outline on the thead element we can better see what is happening.
Radar WebKit Bug Importer
Comment 4 2023-02-08 23:56:09 PST
Radar WebKit Bug Importer
Comment 5 2023-02-08 23:58:42 PST
Rob Buis
Comment 6 2023-05-19 07:16:21 PDT
EWS
Comment 7 2023-06-02 21:26:40 PDT
Committed 264849@main (0e5a15b84122): <https://commits.webkit.org/264849@main> Reviewed commits have been landed. Closing PR #14078 and removing active labels.
Thomas Wisniewski [:twisniewski]
Comment 8 2023-06-18 07:26:07 PDT
Might the WPT in this patch be pushed to the main repo? It would be nice to have it on wpt.live.
Rob Buis
Comment 9 2023-06-19 12:06:33 PDT
(In reply to Thomas Wisniewski [:twisniewski] from comment #8) > Might the WPT in this patch be pushed to the main repo? It would be nice to > have it on wpt.live. Thanks for the heads up, I forgot to land the test in wpt, should be fixed now.
Thomas Wisniewski [:twisniewski]
Comment 10 2023-06-19 12:37:05 PDT
No worries, thanks!
Note You need to log in before you can comment on or make changes to this bug.