W3C home > Mailing lists > Public > public-appformats@w3.org > August 2006

Re: [XBL2] state="" attribute

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 14 Aug 2006 23:21:55 +0000 (UTC)
To: Anne van Kesteren <annevk@opera.com>
Cc: public-appformats@w3.org
Message-ID: <Pine.LNX.4.62.0608142314520.5340@dhalsim.dreamhost.com>

On Mon, 14 Aug 2006, Anne van Kesteren wrote:
>
> On Mon, 14 Aug 2006 16:10:04 -0700, Ian Hickson <ian@hixie.ch> wrote:
> > > What's the use case for this attribute given that there's a class=""
> > > attribute already which allows basically the same.
> > 
> > It's easier to set a separate attribute than it is to edit the class
> > attribute.
> 
> I thought this would be the answer and I tend to disagree. If it's hard 
> to edit the class attribute we should just make that easier by having 
> .className.add("foo") etc.

We'll do that too, but where's the harm in having this attribute? There's 
zero requirements on UAs, it just allows authors to do more.

I actually was considering just saying that any attribute is allowed, but 
that seemed more dangerous.

I've been using state="" a lot in XBL1+SVG documents. I use it for things 
like where a switch has three states, and one of the elements in the 
shadow tree needs to have those states. Then I key CSS off it, without 
having to worry about the class attribute, which is used for separate 
things (like UI state).

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 14 August 2006 23:22:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:10:20 GMT