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: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 21 Aug 2012 13:01:42 -0700
Message-ID: <CAAWBYDDnvtF9Kj62Y8CiA+y-e1=Re0SaDSa4q2yb1G+W8jxstg@mail.gmail.com>
To: Ojan Vafai <ojan@chromium.org>
Cc: public-webapps <public-webapps@w3.org>
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.

> That said, I share your worry that having this be dynamic would slow down
> DOM modification too much.
> What if we only allowed a restricted set of selectors and made these sheets
> dynamic instead? Simple, non-pseudo selectors have information that is all
> local to the node itself (e.g. can be applied before the node is in the
> DOM). Maybe even just restrict it to IDs and classes. I think that would
> meet the majority use-case much better.

I think that being able to use complex selectors is a sufficiently
large use-case that we should keep it.

> Alternately, what if these applied the attributes asynchronously (e.g. right
> before style resolution)?

Can you elaborate?

Received on Tuesday, 21 August 2012 20:02:42 UTC

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