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:58:28 -0700
Message-ID: <CAAWBYDC=ZW3Aor9Ks_jHV7qgC52D-VBsGXeeMRz66qmKMMzp0A@mail.gmail.com>
To: Ojan Vafai <ojan@chromium.org>
Cc: public-webapps <public-webapps@w3.org>
On Tue, Aug 21, 2012 at 1:42 PM, Ojan Vafai <ojan@chromium.org> wrote:
> On Tue, Aug 21, 2012 at 1:01 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.
>
>
> Ah, I missed the "plus a mutation observer that reruns the mutations on any
> nodes added to the document" bit. Ok, so this timing is very specific then.
> It would get applied at the microtask time, not at the time the DOM was
> modified. Would it get applied before or after mutation observers get
> called? Seems like you'd want it to execute first. Calling it after mutation
> observers would require an extra delivery of mutations after the attributes
> are applied, which seems silly.

I presume there's an ordering of mutation observers, such that ones
defined earlier in document history get the notifications first, or
somesuch?  If so, CAS should indeed run before any author-defined
observers.

~TJ
Received on Tuesday, 21 August 2012 20:59:17 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:54 GMT