W3C home > Mailing lists > Public > www-style@w3.org > May 2015

Re: [css-variables] var() for non-custom properties

From: Glen Huang <curvedmark@gmail.com>
Date: Sat, 23 May 2015 10:58:45 +0800
Cc: Fran├žois REMY <francois.remy.dev@outlook.com>, Bang Seongbeom <bangseongbeom@hotmail.com>, "www-style@w3.org" <www-style@w3.org>
Message-Id: <BCE5B21C-1E90-48B0-BB4F-D19E675BC47D@gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
> Yes, this is the main reason we don't and won't allow this.

IMHO, this is like saying since recursions have the possibility to loop forever, they shouldn't exist.

I think the benefit of being able to reuse computed values far outweighs the hiccups created by cyclic dependencies (just look what all kinds of crazy stuff js can do if it's used for layout).

If cyclic dependencies do raise up, I think we can simply discard the culprit properties and treat them like they never exist, like how we resolve `--foo: var(--foo); color: var(--foo)` if I'm not wrong.

I discovered gss[1] recently. They took this property dependencies to the next level with VFL[2]. I wonder if there is any interest in evolve css to that direction?

[1] http://gridstylesheets.org/
[2] http://gridstylesheets.org/guides/vfl/
Received on Saturday, 23 May 2015 02:59:21 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:51 UTC