Enable privileged embedding documents to set CSS environment variables (or CSS cascading variables) in embedded SVG
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Tracking
()
People
(Reporter: jwatt, Assigned: jwatt)
References
Details
Updated•7 years ago
|
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
Comment 6•6 years ago
|
||
Any news on this?
I wrote about 50 lines of code to listen to theme changes, somehow guess the color that’s used by Firefox to fill its own icons and then generate the SVG with the correct fill=XXXXX
in it. But even that falls short because I can set only one sidebarAction
icon but a theme can have a different color for sidebar header and popup menus — something that’s easy to get with Firefox Color.
To support the new toolbar
color of contextualIdentitities.ContextualIdentity, which depends on the current theme, I had to ditch my SVGs with the colors hardcoded, put them on the form of strings in my JavaScript code, replace the color on-the-fly and transform them to a data:image/svg+xml
URL so that I can pass them to the menus.create()
and have them colored properly.
This would be great to just be able to use an icon with needed to engineer a system to color them properly.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Comment 9•2 years ago
|
||
(In reply to Jonathan Watt [:jwatt] from comment #0)
The latest incarnation of that proposal
can be found at:https://tabatkins.github.io/specs/svg-params/#setting
We should consider working out the issues in that draft and then
implementing a first pass restricted to our frontend code and possibly
WebExtensions.
Ah, I spun off bug 1782815 to cover this (per the CSSWG resolution today) before realizing we had this preexisting bug here. :)
I'll just dupe this older bug forward to bug 1782815 so we can "start fresh" over there, since most of the existing comments are somewhat speculative RE how the feature should work, which isn't as relevant at this point now that we have a relatively-agreed-upon draft spec. jwatt, hope that's OK with you.
Updated•2 years ago
|
Description
•