W3C home > Mailing lists > Public > www-style@w3.org > October 2008

Re: Selectors Tests

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Thu, 30 Oct 2008 23:51:02 +0100
Message-ID: <490A3A56.8000904@lachy.id.au>
To: fantasai <fantasai.lists@inkedblade.net>
CC: www-style <www-style@w3.org>

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.


> 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
Received on Thursday, 30 October 2008 22:51:55 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:40 UTC