W3C home > Mailing lists > Public > public-html-comments@w3.org > August 2009

Re: Alternate syntax for defining class attribute

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 25 Aug 2009 03:28:55 +0000 (UTC)
To: "T.J. Crowder" <tj@crowdersoftware.com>
Cc: public-html-comments@w3.org
Message-ID: <Pine.LNX.4.62.0908250157180.13789@hixie.dreamhostps.com>
On Sat, 15 Aug 2009, T.J. Crowder wrote:
> > 
> > We've looked at doing this before, but it has a very poor backwards- 
> > compatibility story, unfortunately.
> 
> Yes, again, I did make the point in my original post that using this 
> shorthand form would very much be a "caveat author" (author beware) 
> situation -- the effect in older UAs will not be as desired.  Very much 
> like the new tags.  I frankly wouldn't expect to get much use out of 
> this new shorthand form for a good 3-4 years while compliance comes up 
> -- but in 3-4 years, it would be quite nice to have, hence suggesting it 
> now.

I think it would take a lot longer than 4 years, but in the meantime we'd 
have quite an unfortunate situation with respect to some browsers having 
very different results than others, etc.


> > It wouldn't be that hard to parse, but it would only save you a 5 
> > keystrokes...
> 
> Which is to say, frequently, half the total.  I think 50% gains are 
> worth pursuing.  But even more so, the alignment with CSS syntax is very 
> attractive and natural.

I think what would be helpful would be to make a JS library that fakes 
this (by searching for elements with attributes that start with "." and 
adding them to the class="" attribute), and seeing if it gets adoption. 
That would provide interesting information for future developers of HTML.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 25 August 2009 03:28:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 1 June 2011 00:14:00 GMT