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

Re: [css-variables] Referencing all properties (Issue 4, !important)

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 6 Sep 2012 22:52:37 -0700
Message-ID: <CAAWBYDB6ao1yktC7jhigzDJcrTDiqsU79_5biem+xmpJ3BkoXA@mail.gmail.com>
To: Sebastian Zartner <sebastianzartner@gmail.com>
Cc: François REMY <fremycompany_pub@yahoo.fr>, CSS WG <www-style@w3.org>
On Thu, Sep 6, 2012 at 9:56 PM, Sebastian Zartner
<sebastianzartner@gmail.com> wrote:
> There are many use cases, in which you want to refer to the computed
> value of another property.
> E.g. last week I would have liked to use calc() (actually -moz-calc())
> in relation to the calculated height of an element (having "height"
> set to a percentual value, and pixel values for "min-height" and
> "max-height"), which obviously doesn't work at the moment.

That wouldn't be the computed value, but rather the used value, which
is extra-hard.  It basically can't be done in a declarative system
like CSS.

> Anyway, I totally agree that referencing all properties should be put
> into level 2. As François said it's just something we shouldn't block
> with the syntax we choose for level 1.

It's not blocked.  Property references on the element (thematically
similar to current var() function) are pretty much out automatically,
so no worries there.  Property references to the element's parent
*might* be possible, and there's nothing messing with that right now.

~TJ
Received on Friday, 7 September 2012 05:53:26 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:59 GMT