W3C home > Mailing lists > Public > www-style@w3.org > November 2012

Re: [CSS-Variables] Suggestion of change to time of substitution

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 7 Nov 2012 13:38:02 -0800
Message-ID: <CAAWBYDCKHAo5kxb3yAYxAeY-kvdUckvBWcWyrRtbbC1K=cHYWw@mail.gmail.com>
To: Fran├žois REMY <francois.remy.dev@outlook.com>
Cc: Tom Potts <karaken12@gmail.com>, CSS WG <www-style@w3.org>
On Wed, Oct 31, 2012 at 6:12 AM, Fran├žois REMY
<francois.remy.dev@outlook.com> wrote:
> If I'm correct his point seems to be that
>    .some {
>        var-x: inherit;
>    }
> is being affected by the [[6.1.2 Interitance]] paragraph of CSS 2.1 so that
> the computed value of the 'var-x' property on the '.some' elements will
> actually inherit the value of the parent, and this will affect the children
> element as well as it's the computed value which is inherited and not the
> specified/resolved one. If I'm not mistaken, we need to state explicitely
> that the only algorithm impacting the computed value of custom properties is
> the reference resolution algorithm, whatever other specifications may say
> (ie: 'vw' aren't computed in 'px', inherit isn't subsituted by the value on
> the parent, etc).

Things that would happen at computed-value time are already taken care
of, because you don't know the type of the values - it's a naked token
stream - and so you can't do any resolution at all.

I'm not sure whether the global keywords should have their normal
effect, or be treated as part of the value.  I'm inclined to let them
have their normal effect, because if we let them stick around as part
of the value, they'll get substituted into other properties at
computed-value time, when it's already too late to actually process
them (they're processed in the transition from cascaded to specified
value).  No reason to confuse or mislead people here.

I'll file it as an issue.

Received on Wednesday, 7 November 2012 21:38:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:23 UTC