Re: [css-variables] Why we can not use 'var()' function for normal property

On Tue, Jun 2, 2015 at 12:42 PM, Marat Tanalin <mtanalin@yandex.ru> wrote:
> Sure. It's just a matter of what we want more: a limited feature with some possible inconsistency in edge cases, or no feature at all.

This isn't edge-cases.  There are a *lot* of implicit dependencies
between properties, and people *will* hit them.  We do add new
dependencies regularly, and this *will* affect pages that were fine
previously.  We're not allowed to be inconsistent, and we're
*especially* not going to produce a feature that is guaranteed to
break pages as we extend the language in unrelated ways.

You can't refer to the values of other properties.  Full stop.  It
won't happen.  Every possible strategy involves breaking pages as we
extend the language.  If you want property A to have the same value as
property B, set up a custom property and use it in both of them.

> By the way, we already have multiple inconsistencies in CSS, e.g.:
>
>     * `@import` working only if used before any other rules;
>     * `currentColor` using camelCase instead of hyphen-separated notation;
>     * `:has()` available in the "Complete" profile, but not in the "Fast" one.

All of these examples are completely irrelevant to the "inconsistency"
in question.  We're talking about behavior differing between browsers,
between browser versions, or between pages in the same browser
version.  It might be inconsistent within a single page across
reloads, depending on implementation strategy.  This is not something
we will allow, ever.

~TJ

Received on Tuesday, 2 June 2015 20:34:56 UTC