The next micro version of librsvg will support CSS var(--blah, #112233) wherever a color is allowed. This is the first step in supporting CSS custom properties for SVG Native, AKA OpenType SVG glyphs.
gitlab.gnome.org/GNOME/librsvg…
(#997): Support "var(--foo, #aabbcc)" just for colors (!897) · Merge requests · GNOME / librsvg · GitLab
This adds very minimal support for CSS var(), just for properties that accept colors. The parser is extremely minimal, and has these limitations: ...GitLab
Federico Mena Quintero
in reply to Federico Mena Quintero • • •Currently it does that via a not-too-gross hack: the var(--name, color) parsing is done in the parser for colors, and it just picks up the fallback color from that syntax.
Still, *that* lets pre-colored OpenType fonts start working already. The remaining work is to enable recoloring glyphs based on the OpenType's font's color table.
Federico Mena Quintero
in reply to Federico Mena Quintero • • •Also, today's discovery: normally if I want to read a W3C spec I need to do it in the morning, or my brain is too fried in the afternoon. Today I took a nap after a huge lunch, and was able to read and understand most of the CSS Custom Properties spec.
The moral of the story: take more naps.
Ross of Ottawa
in reply to Federico Mena Quintero • • •