Bug 255282 - CSS Variables not applied to SVGUseElement when href is external
Summary: CSS Variables not applied to SVGUseElement when href is external
Status: RESOLVED DUPLICATE of bug 254549
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari 16
Hardware: Mac (Intel) macOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-11 06:00 PDT by Robin Neal
Modified: 2023-04-11 16:16 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Neal 2023-04-11 06:00:13 PDT
Since Safari 16.4, CSS Variables defined on the SVGUseElement are no longer applied to the used SVG element.


Here is an isolated test case:
https://4z5y4g-3000.csb.app

In Chrome, Firefox, and older versions of Safari, the first icon should be red, and all other icons blue.

In Safari 16.4, the last two icons are black.

The icons stroke colour is set via a CSS variable, `--icon-stroke-color`. It is set to fallback to black.

This still works when the use[href] target is an element on the same page. The issue only occurs with external sources. This is regardless of whether the file is hosted on the same domain, or a different domain. Relative paths and absolute paths both produce the same issue.
Comment 1 Said Abou-Hallawa 2023-04-11 16:16:27 PDT
This is was fixed by 262698@main.

*** This bug has been marked as a duplicate of bug 254549 ***