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

Re: [css-variables] Using $foo as the syntax for variables

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 24 May 2012 10:03:06 -0700
Message-ID: <CAAWBYDAOivLtXjBKVr7_k3fL1xwrw-dasG9_vxP6N532eDXHNA@mail.gmail.com>
To: Florian Rivoal <florianr@opera.com>
Cc: Ojan Vafai <ojan@chromium.org>, www-style@w3.org
On Thu, May 24, 2012 at 12:20 AM, Florian Rivoal <florianr@opera.com> wrote:
> On Wed, 23 May 2012 19:32:50 +0200, Tab Atkins Jr. <jackalmage@gmail.com>
> wrote:
>>>> 2)
>>>> It is less disruptive of the grammar
>>> This doesn't seem like a big deal to me. The edge cases where this
>>> matters
>>> are again not worth the cost.
>> Yes, it's a small matter for implementations.
>> More importantly, this is prioritizing theoretical purity and minor
>> implementation convenience over author convenience, which is the wrong
>> ordering of constituencies.
> I am not at all worried about the minor inconvenience caused to the browser
> vendors. I am worried about the bazillion of little tools out there that
> have a good have of choking on the $ syntax.

If they follow CSS's error-recovery rules, they're fine.  They'll
ignore up to the next semi-colon.

If the don't follow the rules that have been in the spec for a
decade+, it's kinda their fault.  I'd be sympathetic to decent
breakage, but I'd want it shown before I try to work around it, rather
than avoiding something on the suspicion that *maybe* it'll break some
unknown quantity of tools.

I'm also generally okay with new stuff not working in old tools, as
long as it's not something that people don't have much of a choice
about using.  Breaking a browser is a bad thing.  Breaking one
particular CSS parsing library used by a syntax-highlighting script,
only when the author uses variables, is less bad.

>>>> 4) Because SASS variables and CSS variables behave differently,
>>>> I can reasonably see authors wanting to use either, or
>>>> even wanting to use both in the same style sheet. Using the same
>>>> syntax is asking for trouble.
>>> I think this is worth considering, but this doesn't convince me that we
>>> should make the API we ship less convenient for authors coding directly
>>> to
>>> the platform.
>> More importantly, one of the maintainers of the SASS language
>> explicitly told us not to worry about this issue, because SASS will
>> change around CSS.  He absolutely does *not* want us to make decisions
>> about CSS syntax based on avoiding confusion with SASS.  I
>> respectfully suggest that we listen to him about his own project. ^_^
> If $ was the only way to get variables, I'd be grateful about his statement
> that he'll just fix is stuff if we break it. But as I think $ isn't much
> better,
> and in my mind worse than var-, I don't see the point of breaking his stuff
> in
> the first place.

Okay, then we're debating personal taste.  Since I obliquely pointed
to this thread in Twitter, I've received nearly a dozen people saying
they're excited, and not a single negative voice (I'm sure they're out
there, but I haven't heard them yet).  I also know that others within
the WG are cool with this (some people mentioned this syntax when I
first presented the modern draft at TPAC), so it's not even a "WG
versus authors" divide.

Received on Thursday, 24 May 2012 17:04:01 UTC

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