W3C home > Mailing lists > Public > www-style@w3.org > December 2006

Re: [whatwg] HTML syntax: shortcuts for 'id' and 'class' attributes

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 1 Dec 2006 03:27:33 +0000 (UTC)
To: Andrew Fedoniouk <news@terrainformatica.com>
Cc: www-style@w3.org
Message-ID: <Pine.LNX.4.62.0612010327140.4460@dhalsim.dreamhost.com>

On Thu, 30 Nov 2006, Andrew Fedoniouk wrote:
> 
> While we are on the subject of discussing HTML syntax....
> 
> How about following (wild) idea?
> 
> To allow following notation (borrowed from CSS selectors):
> 
> <p.myclass>...</p> is equivalent of 
> <p class="myclass">...</p> 
> 
> <p#myid>...</p> is equivalent of 
> <p id="myid">...</p> 
> 
> <p.myclass1.myclass2>...</p> is equivalent of 
> <p class="myclass1 myclass2">...</p> 
> 
> <p#myid.myclass1.myclass2>...</p> is equivalent of 
> <p id="myid" class="myclass1 myclass2">...</p> 
> 
> It is syntax sugar of course but at least it will reduce amount of data 
> needs to be sent over the wire.

Unfortuntely that wouldn't be backwards compatible, and so isn't really an 
option.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 1 December 2006 03:27:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:47 GMT