RESOLVED FIXED 254549
REGRESSION(259807@main): CSS variables are not applied to the SVG use element's shadow tree
https://bugs.webkit.org/show_bug.cgi?id=254549
Summary REGRESSION(259807@main): CSS variables are not applied to the SVG use element...
Mauri
Reported 2023-03-27 15:07:35 PDT
We're using CSS variables to style things inside an SVG. We're dynamically importing SVGs using the `<use>` element. This element creates a Shadow DOM. We're not able to see variables inside that Shadow DOM. Steps to Reproduce: 1) Use iOS Safari 16.4 (it works fine on 16.3) 2) Go to this page https://ios-safari-bug-yt1o.glide.page 3) You'll see two buttons, Add and Delete, with their icons. Actual Results: Icons are black colored. Expected Results: Icons should match the text color. Build Date & Hardware: Build 2023-03-27 on iOS 16.4 running on iPhone 13 Pro. Additional Builds and Platforms: Works fine on iOS 16.3, Mac OS Safari Version 16.3 (18614.4.6.1.6), Chrome, and Firefox.
Attachments
Ahmad Saleem
Comment 1 2023-03-27 16:36:54 PDT
I am able to reproduce this with Safari Technology Preview 166 as well. Chrome Canary 114 and Firefox Nightly 113 works fine. Since it worked fine in 16.3 but not in 16.4, should we rename title to add [Regression - 16.4]?
Ahmad Saleem
Comment 2 2023-03-27 16:56:37 PDT
NOTE - WebKit ToT (262178@main) also has same behavior as Safari 16.4. So this is not fixed yet on trunk as well.
Radar WebKit Bug Importer
Comment 3 2023-03-27 18:56:38 PDT
Mauri
Comment 4 2023-03-28 05:48:58 PDT
(In reply to Ahmad Saleem from comment #1) > I am able to reproduce this with Safari Technology Preview 166 as well. > > Chrome Canary 114 and Firefox Nightly 113 works fine. > > Since it worked fine in 16.3 but not in 16.4, should we rename title to add > [Regression - 16.4]? Thanks for looking at it. It's the first time I report something here, I'm happy to update the title if that's something I should do. How do you handle these cases?
Said Abou-Hallawa
Comment 5 2023-03-28 13:30:12 PDT
This seems to be a recent regression. I could narrow it down to one of these changes https://commits.webkit.org/compare/259818@main...259759@main
Mauri
Comment 6 2023-03-28 15:15:05 PDT
(In reply to Mauri from comment #0) > We're using CSS variables to style things inside an SVG. We're dynamically > importing SVGs using the `<use>` element. This element creates a Shadow DOM. > We're not able to see variables inside that Shadow DOM. > > Steps to Reproduce: > > 1) Use iOS Safari 16.4 (it works fine on 16.3) > > 2) Go to this page https://ios-safari-bug-yt1o.glide.page > > 3) You'll see two buttons, Add and Delete, with their icons. > > > Actual Results: > > Icons are black colored. > > Expected Results: > > Icons should match the text color. > > Build Date & Hardware: > > Build 2023-03-27 on iOS 16.4 running on iPhone 13 Pro. > > Additional Builds and Platforms: > > Works fine on iOS 16.3, Mac OS Safari Version 16.3 (18614.4.6.1.6), > Chrome, and Firefox. Updating steps to reproduce it: Go to: https://ios-svg-bug.vercel.app/ You should see a red magnifying glass, instead, you're seeing a black one. We manage to temporarily work around this on Safari 16.4, so the original URL for reproducing this won't work anymore. Please use https://ios-svg-bug.vercel.app/ instead
Antti Koivisto
Comment 7 2023-04-06 17:43:17 PDT
EWS
Comment 8 2023-04-06 21:25:29 PDT
Committed 262698@main (abf098f7f5b0): <https://commits.webkit.org/262698@main> Reviewed commits have been landed. Closing PR #12488 and removing active labels.
Antti Koivisto
Comment 9 2023-04-07 05:34:58 PDT
The bug was specifically that custom properties were not inherited to the root element of an external SVG resource when it was used as a <use> target.
Mauri
Comment 10 2023-04-10 07:47:55 PDT
wow! Thank you so much for fixing this! When do we expect this to be released? Is there any doc that talks about your release cycle?
Said Abou-Hallawa
Comment 11 2023-04-11 16:16:27 PDT
*** Bug 255282 has been marked as a duplicate of this bug. ***
Jen Simmons
Comment 12 2023-04-21 13:57:05 PDT
> Is there any doc that talks about your release cycle? No. > When do we expect this to be released? I'd recommend testing in a future Safari 16.5 beta or later.
Said Abou-Hallawa
Comment 13 2023-05-24 14:42:35 PDT
*** Bug 255985 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.