W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2012

Re: Proposal for "Cascading Attribute Sheets" - like CSS, but for attributes!

From: Brian Kardell <bkardell@gmail.com>
Date: Tue, 21 Aug 2012 16:37:18 -0400
Message-ID: <CADC=+jeq4bgF-ZtOPGxSW327RbFAZYAy2jGwOLoCBd9X=t8FhA@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: public-webapps <public-webapps@w3.org>, Ojan Vafai <ojan@chromium.org>
On Tue, Aug 21, 2012 at 4:32 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Tue, Aug 21, 2012 at 1:30 PM, Brian Kardell <bkardell@gmail.com> wrote:
>> On Aug 21, 2012 4:03 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>>> On Tue, Aug 21, 2012 at 12:37 PM, Ojan Vafai <ojan@chromium.org> wrote:
>>>> Meh. I think this loses most of the "CSS is so much more convenient"
>>>> benefits. It's mainly the fact that you don't have to worry about
>>>> whether
>>>> the nodes exist yet that makes CSS more convenient.
>>> Note that this benefit is preserved.  Moving or inserting an element
>>> in the DOM should apply CAS to it.
>>> The only thing we're really losing in the dynamic-ness is that other
>>> types of mutations to the DOM don't change what CAS does, and some of
>>> the dynamic selectors like :hover don't do anything.
>> So if I had a selector .foo .bar and then some script inserted a .bar inside
>> a .foo - that would work... but if I added a .bar class to some existing
>> child of .foo it would not...is that right?
> Correct.  If we applied CAS on attribute changes, we'd have... problems.
> ~TJ

Because you could do something like:

.foo[x=123]{ x:  234; }
.foo[x=234]{ x:  123; }

Received on Tuesday, 21 August 2012 20:37:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:38 UTC