Re: Tabbed Interfaces in CSS

Tab Atkins Jr. wrote:
> You mean creating an element which is pre-:checked?  I don't think
> that's possible.

   <input type="radio" selected>

At least assuming you're using the existing :checked pseudoclass.

> Or do you mean moving a node from one document to another, where it
> matched :checked in the first document?

Or within the same document.

> Are there any weirdnesses that I'm overlooking that would cause
> problems here?

I don't know; it depends on exactly what use cases you're trying to 
address with this stuff.

>>  Or has its radio-group property changed, with the same
>> effect?
> 
> This is the interesting problem.

It's the same problem, really.

> I'm fine with taking the easy way out.  Whenever radio-group changes, the element becomes un:checked.

Which is the same as your proposed solution for the DOM changes above. 
I'd be fine with this; it's nice and simple.

> Some cursory thinking doesn't show this as causing any problems.  I
> basically want :checked to change *only* as a result of direct user
> interaction, not due to some crazy conflict-resolution rules.

Right; those are the part of HTML radio behavior that really suck.

-Boris

Received on Saturday, 25 April 2009 05:39:33 UTC