Re: Selectors Tests

fantasai wrote:
> Lachlan Hunt wrote:
>> Boris Zbarsky wrote:
>>> I probably even agree that <input type="hidden"> shouldn't match 
>>> :enabled/:disabled, but I think the Selectors text as it stands 
>>> doesn't really say what we want it to say...
>>
>> Agreed.
> 
> Well, the Selectors spec is fixable. Daniel and I are actively
> editing it now. However I don't think I agree that :enabled/:disabled
> should not apply to type="hidden". The distinction does exist for
> hidden controls as well, does it not?

Yes, you can use the disabled attribute on them as well, so it could be 
defined that:

<input type="hidden"> matches :enabled, and
<input type="hidden" disabled> matches :disabled.

I don't mind which alternative is chosen, though it might make more 
sense to use a definition in Selectors that lets the markup language 
itself define which elements match the pseudo-classes, as has been 
suggested in a previous thread on this list.

http://lists.w3.org/Archives/Public/www-style/2008Oct/0161.html

> An interesting question would be what happens if I write
>   input[type="hidden"] { display: inline; }
> Would I get nothing? A readonly input control? Something else?

You can test that for yourself in browsers.  I tested Opera and Firefox, 
they didn't render anything, which seems sensible.  But I'm not sure how 
that's relevant to the issue.

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/

Received on Thursday, 30 October 2008 22:51:55 UTC