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

2015-05-05 Thread Austin William Wright
On Mon, May 4, 2015 at 8:52 PM, Lea Verou l...@verou.me wrote: Sorry for reviving such an old thread (almost 3 years now!) but I recently came across a huge use case for CAS: Semantic data! Namely, Microdata and RDFa. They’re both applied using attributes, which makes them super tedious to

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

2012-10-05 Thread Tab Atkins Jr.
On Fri, Oct 5, 2012 at 4:22 AM, Henri Sivonen hsivo...@iki.fi wrote: On Tue, Aug 21, 2012 at 9:17 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: Similarly, some of the a11y folks have recently been talking about applying aria-* attributes via CSS, again, because it's just so much more

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

2012-09-03 Thread Glenn Maynard
This can be implemented in script using mutation observers (provided the parser-inserted elements question shakes out in the right direction, which seems a prerequisite for any robust use of that API), right? -- Glenn Maynard

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

2012-08-28 Thread Maciej Stachowiak
On Aug 27, 2012, at 2:07 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: I have mixed feelings about this proposal overall, but I think it's a little weird to use CSS property syntax instead of markup-like attribute syntax to set attributes. I think this makes the syntax confusingly

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

2012-08-27 Thread Tab Atkins Jr.
On Wed, Aug 22, 2012 at 6:32 PM, Maciej Stachowiak m...@apple.com wrote: On Aug 21, 2012, at 1:59 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Aug 21, 2012 at 1:37 PM, Brian Kardell bkard...@gmail.com wrote: On Tue, Aug 21, 2012 at 4:32 PM, Tab Atkins Jr. jackalm...@gmail.com wrote:

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

2012-08-22 Thread Tab Atkins Jr.
On Tue, Aug 21, 2012 at 5:48 PM, Dimitri Glazkov dglaz...@google.com wrote: Can we extend this to custom DOM element registration somehow? ul.newsli { identity: x-news-item; } or maybe even: ul.newsli { identity: url(//example.com/test/news.html#news-item); } If that's an

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

2012-08-22 Thread Dimitri Glazkov
Yes, but... One of the problems with the is attribute is that it's magic: only the parser reacts to it, and changing it does not do anything. I was hoping for some special notation that clearly made it not an attribute, so that at least the magic is confined to CAS, and does not extend to weird

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

2012-08-22 Thread Bronislav Klučka
On 22.8.2012 1:13, Tab Atkins Jr. wrote: On Tue, Aug 21, 2012 at 4:07 PM, Glenn Maynard gl...@zewt.org wrote: FWIW, while I don't find the idea of attaching event listeners this way too interesting (maybe I could be convinced, but event capturing is already convenient for most of these

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

2012-08-22 Thread Tab Atkins Jr.
On Wed, Aug 22, 2012 at 9:11 AM, Dimitri Glazkov dglaz...@google.com wrote: Yes, but... One of the problems with the is attribute is that it's magic: only the parser reacts to it, and changing it does not do anything. I was hoping for some special notation that clearly made it not an

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

2012-08-22 Thread Tab Atkins Jr.
On Wed, Aug 22, 2012 at 9:20 AM, Bronislav Klučka bronislav.klu...@bauglir.com wrote: On 22.8.2012 1:13, Tab Atkins Jr. wrote: Actually, the two should be identical, because CAS is applied as a mutation observer, rather than synchronously. As long as those statements appear in the same

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

2012-08-22 Thread Maciej Stachowiak
On Aug 21, 2012, at 1:59 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Aug 21, 2012 at 1:37 PM, Brian Kardell bkard...@gmail.com wrote: On Tue, Aug 21, 2012 at 4:32 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: Correct. If we applied CAS on attribute changes, we'd have... problems.

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

2012-08-21 Thread Tab Atkins Jr.
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. Similarly, some of the a11y folks have recently been talking about applying aria-*

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

2012-08-21 Thread Ojan Vafai
On Tue, Aug 21, 2012 at 11:17 AM, Tab Atkins Jr. jackalm...@gmail.comwrote: 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.

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

2012-08-21 Thread Tab Atkins Jr.
On Tue, Aug 21, 2012 at 12:37 PM, Ojan Vafai o...@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

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

2012-08-21 Thread Brian Kardell
On Aug 21, 2012 4:03 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Aug 21, 2012 at 12:37 PM, Ojan Vafai o...@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

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

2012-08-21 Thread Tab Atkins Jr.
On Tue, Aug 21, 2012 at 1:30 PM, Brian Kardell bkard...@gmail.com wrote: On Aug 21, 2012 4:03 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Aug 21, 2012 at 12:37 PM, Ojan Vafai o...@chromium.org wrote: Meh. I think this loses most of the CSS is so much more convenient benefits. It's

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

2012-08-21 Thread Brian Kardell
On Tue, Aug 21, 2012 at 4:32 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Aug 21, 2012 at 1:30 PM, Brian Kardell bkard...@gmail.com wrote: On Aug 21, 2012 4:03 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Aug 21, 2012 at 12:37 PM, Ojan Vafai o...@chromium.org wrote: Meh. I

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

2012-08-21 Thread Ojan Vafai
On Tue, Aug 21, 2012 at 1:01 PM, Tab Atkins Jr. jackalm...@gmail.comwrote: On Tue, Aug 21, 2012 at 12:37 PM, Ojan Vafai o...@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

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

2012-08-21 Thread Tab Atkins Jr.
On Tue, Aug 21, 2012 at 1:37 PM, Brian Kardell bkard...@gmail.com wrote: On Tue, Aug 21, 2012 at 4:32 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: Correct. If we applied CAS on attribute changes, we'd have... problems. Because you could do something like: .foo[x=123]{ x: 234; }

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

2012-08-21 Thread Travis Leithead
From: Tab Atkins Jr. [mailto:jackalm...@gmail.com] On Tue, Aug 21, 2012 at 1:42 PM, Ojan Vafai o...@chromium.org wrote: On Tue, Aug 21, 2012 at 1:01 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Aug 21, 2012 at 12:37 PM, Ojan Vafai o...@chromium.org wrote: Meh. I think this

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

2012-08-21 Thread Tab Atkins Jr.
On Tue, Aug 21, 2012 at 2:20 PM, Travis Leithead travis.leith...@microsoft.com wrote: From: Tab Atkins Jr. [mailto:jackalm...@gmail.com] On Tue, Aug 21, 2012 at 1:42 PM, Ojan Vafai o...@chromium.org wrote: On Tue, Aug 21, 2012 at 1:01 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue,

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

2012-08-21 Thread Ojan Vafai
On Tue, Aug 21, 2012 at 1:58 PM, Tab Atkins Jr. jackalm...@gmail.comwrote: On Tue, Aug 21, 2012 at 1:42 PM, Ojan Vafai o...@chromium.org wrote: On Tue, Aug 21, 2012 at 1:01 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Aug 21, 2012 at 12:37 PM, Ojan Vafai o...@chromium.org wrote:

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

2012-08-21 Thread Brian Kardell
On Aug 21, 2012 5:40 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Aug 21, 2012 at 2:28 PM, Ojan Vafai o...@chromium.org wrote: On a somewhat unrelated note, could we somehow also incorporate jquery style live event handlers here? See previous www-dom discussion about this: . I

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

2012-08-21 Thread Tab Atkins Jr.
On Tue, Aug 21, 2012 at 3:15 PM, Brian Kardell bkard...@gmail.com wrote: On Aug 21, 2012 5:40 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Aug 21, 2012 at 2:28 PM, Ojan Vafai o...@chromium.org wrote: On a somewhat unrelated note, could we somehow also incorporate jquery style live

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

2012-08-21 Thread Rick Waldron
Comments inline... On Tue, Aug 21, 2012 at 6:17 PM, Tab Atkins Jr. jackalm...@gmail.comwrote: On Tue, Aug 21, 2012 at 3:15 PM, Brian Kardell bkard...@gmail.com wrote: On Aug 21, 2012 5:40 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Aug 21, 2012 at 2:28 PM, Ojan Vafai

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

2012-08-21 Thread Tab Atkins Jr.
On Tue, Aug 21, 2012 at 3:29 PM, Rick Waldron waldron.r...@gmail.com wrote: On Tue, Aug 21, 2012 at 6:17 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: ul.special li { onclick: alert('You clicked me!'); evt.target.classlist.add('clicked');; } This is certainly interesting, but... 1.

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

2012-08-21 Thread Lea Verou
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

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

2012-08-21 Thread Rick Waldron
On Tue, Aug 21, 2012 at 6:40 PM, Tab Atkins Jr. jackalm...@gmail.comwrote: On Tue, Aug 21, 2012 at 3:29 PM, Rick Waldron waldron.r...@gmail.com wrote: On Tue, Aug 21, 2012 at 6:17 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: ul.special li { onclick: alert('You clicked me!');

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

2012-08-21 Thread Brian Kardell
On Aug 21, 2012 6:49 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Aug 21, 2012 at 3:44 PM, Brian Kardell bkard...@gmail.com wrote: On Aug 21, 2012 6:18 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: So, in my current proposal, you can just set an onfoo attribute: ul.special li

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

2012-08-21 Thread Tab Atkins Jr.
On Tue, Aug 21, 2012 at 3:51 PM, Lea Verou l...@w3.org wrote: 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

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

2012-08-21 Thread Tab Atkins Jr.
On Tue, Aug 21, 2012 at 3:52 PM, Rick Waldron waldron.r...@gmail.com wrote: On Tue, Aug 21, 2012 at 6:40 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Aug 21, 2012 at 3:29 PM, Rick Waldron waldron.r...@gmail.com 3. Where did evt come from? Isn't that one of the magically-defined

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

2012-08-21 Thread Tab Atkins Jr.
On Tue, Aug 21, 2012 at 3:54 PM, Brian Kardell bkard...@gmail.com wrote: On Aug 21, 2012 6:49 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Aug 21, 2012 at 3:44 PM, Brian Kardell bkard...@gmail.com wrote: In other words, what is preventing you from writing... .foo .bar{

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

2012-08-21 Thread Glenn Maynard
FWIW, while I don't find the idea of attaching event listeners this way too interesting (maybe I could be convinced, but event capturing is already convenient for most of these examples), being able to say #myform input { autocomplete: off; autocorrect: off; autocapitalize: off; } or a { rel:

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

2012-08-21 Thread Lea Verou
Ah, right, mea culpa. There’s still the option of restricting attribute selectors altogether or just not responding to attribute changes, but doing so for other kinds of changes. Of course being dynamic in some ways but not others will make it harder to teach and learn, but I believe the

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

2012-08-21 Thread Tab Atkins Jr.
On Tue, Aug 21, 2012 at 4:07 PM, Glenn Maynard gl...@zewt.org wrote: FWIW, while I don't find the idea of attaching event listeners this way too interesting (maybe I could be convinced, but event capturing is already convenient for most of these examples), being able to say #myform input {

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

2012-08-21 Thread Dimitri Glazkov
Can we extend this to custom DOM element registration somehow? ul.newsli { identity: x-news-item; } or maybe even: ul.newsli { identity: url(//example.com/test/news.html#news-item); } :DG On Tue, Aug 21, 2012 at 4:13 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: On Tue, Aug 21,