Re: [XBL2] state="" attribute

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 UTC