Re: Alternate ways of referencing

On Tue, Jan 20, 2015 at 3:33 PM, Rick <graham.rick@gmail.com> wrote:
> Functionally this appears to address my example, and many other
> examples I could conjure.
>
> Particularly interesting is the calc() function.
>
> Would it be possible to use calc() in the same manner as var() or is
> it restricted to a style?
>
> i.e.
>
> <g style="--width: 6;">
>   <rect width="var(--width)" height="6" />
>   <rect x="var(--width)" width="var(--width)" height="12" />
>   <rect x="calc(var(--width)*2)" width="var(--width)" height="7" />
> </g>

Assuming that we properly reference CSS Values & Units for the
definition of <length>/etc, then yes, calc() comes for free in places
that use <length>, as it's a type of <length>.  ^_^

> Lastly, would it be possible to have the result of a calc() return a
> displayable text string?  I have no idea how that might be declared.
> (tref?  ;])

The closest we have so far is the 'content' property, though it's
unclear how or if that applies to SVG content.  This is a topic
that'll be addressed when Doug Shepers and I flesh out the SVG
Parameters spec (which'll specify a way to "pass in" variables from a
referencing URL, so you can reuse a single SVG and alter the, for
example, colors dynamically), as we want the ability to specify text
in the same way you'll be able to specify colors/etc.

~TJ

Received on Tuesday, 20 January 2015 23:53:23 UTC