Re: [css-variables] comments from SVG WG on 20 June 2013 css-variables-1 LCWD

On Thu, Sep 5, 2013 at 3:38 PM, Cameron McCormack <> wrote:
> Hello www-style,
> Here are the review comments from the SVG WG on the 20 June 2013 LCWD of
> css-variables-1.
> 1. [This is not a comment on the specification per se, but something that
> came to mind while reviewing.]  The current plan for the SVG-in-OpenType
> proposal is to allow the font to define one or more palettes that can be
> selected from, or to have author defined colour values for palette entries.
> Within the SVG document that defines the glyphs, palette colours will be
> reflected by applying a user agent style sheet of the form:
>  :root {
>    var-color0: rgba(..., ..., ..., ...);
>    var-color1: rgba(..., ..., ..., ...);
>  }
> Do you feel this is an acceptable use of custom properties, or should there
> be a way to reference palette entries that does not use some of the space of
> the normally user defined custom properties?

Yes, I think this is completely fine.

> 2. We would like to have the ability to animate CSS Variable values,
> although this is not something we need to see in Level 1.

Yup, planning it for a future level.  We need to add type annotations
to make it work correctly.

> 3. Another feature that we had planned to support as part of SVG Parameters,
> but which could be subsumed by CSS Variables, is the ability to pass in
> variable definitions from a containing document.  For example, being able to
> implement (where colour, shadow,
> etc. can be changed) using SVG documents rather than font glyphs.  This also
> does not need to be solved for Level 1.

Yeah, I've discussed this with Doug before, in the context of
obsoleting his SVG Parameters draft in favor of just using Variables.
I think it's completely appropriate for some container context (such
as an SVG document, or an OpenType font) to define some way for
outside information to define values for custom properties.  It would
just be a presentational hint, either at the author or UA level as

For example, SVG currently lacks a generic metadata mechanism, but it
could perhaps adopt <meta/> for that purpose.  Then it could define
something like:

<meta name="variable" content="main-color red" />

which would define a custom property named var-main-color on the root
element as a presentational hint, taking its value from a
"?main-color=..." url parameter, and defaulting to "red".

> 4. The SVG WG has no other issues with CSS Variables at this time.



Received on Thursday, 5 September 2013 22:58:57 UTC