W3C home > Mailing lists > Public > www-style@w3.org > February 2013

Re: [css3-variables] Fallback vs. "invalid at computed-value time"

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sat, 23 Feb 2013 19:50:09 -0800
Message-ID: <CAAWBYDAaBa49fW4yLtxhBtVOMMUo4VL=iiQcPXbfAr_DX-g3xA@mail.gmail.com>
To: Simon Sapin <simon.sapin@kozea.fr>
Cc: www-style list <www-style@w3.org>
On Sat, Feb 23, 2013 at 4:20 PM, Simon Sapin <simon.sapin@kozea.fr> wrote:
> Le 24/02/2013 01:16, Tab Atkins Jr. a écrit :
>> As I said above, implementors purposely didn't want multiple cascaded
>> values, so this is the intended effect for level 1.  It is likely that
>> authors will end up depending on this property, at least accidentally,
>> and so we wont' be able to change it in the future.
>
> That is sad.
>
> Is there an alternative for having similar fallbacks? @supports probably
> works, but it a bit heavy-weight.

Actually, going back to my "typing" idea in my previous message, we
can probably just invalidate the custom property itself, rather than
just make it define an invalid variable.  That way, something like the
following would work (again, purely hypothetical syntax):

var-bg: #333;
var-bg: conic-gradient(...) !type(image);
background: var(bg);

Again, by declaring at parse time how the custom property should be
parsed, we can regain the benefits of the fallback mechanism.  But
this is definitely level 2 stuff.

~TJ
Received on Sunday, 24 February 2013 03:50:57 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:06 GMT