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: Lea Verou <lea@w3.org>
Date: Tue, 21 Aug 2012 15:51:20 -0700
Cc: public-webapps <public-webapps@w3.org>
Message-Id: <72B66C42-813B-48BE-BEE5-4F436843158A@w3.org>
To: Tab Atkins Jr. <jackalmage@gmail.com>
I *love* this idea!!
However, I’m afraid that in all these cases, ”it’s so much more convenient” precisely due to the dynamic nature of CSS, so you don’t have to bind event handlers to cater to document changes etc. I think this proposal would be much more useful if it was dynamic in at least *some* ways. 

I'm probably missing something here, but there are many algorithms to prevent cycle detection. There are even other technologies in the open web stack which could result to circular relationships. For example, let me quote CSS Image Values 4 [1]:
> The ‘element()’ function can produce nonsensical circular relationships, such as an element using itself as its own background. These relationships can be easily and reliably detected and resolved, however, by keeping track of a dependency graph and using common cycle-detection algorithms.

Dropping dynamicity altogether because of a few edge cases doesn't sound like a good idea. Why not just disallow these cases from triggering it? For example, maybe we could define CAS not to be dynamic for changes made through CAS? What other cycles are there?
If such a thing is not possible or too slow, I think restricting the set of allowed selectors like Ojan suggested, would be a more acceptable tradeoff than making the whole thing static.

[1]: http://dev.w3.org/csswg/css4-images/#element-cycles

Lea Verou
W3C developer relations
http://w3.org/people/all#leahttp://lea.verou.me ✿ @leaverou


On Aug 21, 2012, at 11:17, Tab Atkins Jr. wrote:

> I recently participated in an internal thread at Google where it was
> proposed to move a (webkit-specific) feature from an attribute to a
> CSS property, because applying it via a property is *much* more
> convenient.
> 
> [snip]
> 
> Thoughts?  I tried to make this as simple as possible while still
> being useful, so that it's easy to implement and to understand.
> Hopefully I succeeded!
> 
> ~TJ
> 
Received on Tuesday, 21 August 2012 22:51:33 GMT

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