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

Re: Selectors Tests

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Fri, 07 Nov 2008 09:53:13 -0800
Message-ID: <49148089.60002@terrainformatica.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: fantasai <fantasai.lists@inkedblade.net>, Patrick Garies <pgaries@fastmail.us>, www-style@w3.org

Boris Zbarsky wrote:
> 
> Andrew Fedoniouk wrote:
>>> This can't happen.
>>
>> This needs to be specified then.
> 
> It is.

Where it is?

> 
>> :enabled and :disabled are mutually exclusive in all domains CSS is
>> aimed to serve.
> 
> They are, but you can have elements that neither applies to.
> 
>> It means that either one :enabled or :disabled is just enough for 
>> practical needs.
>>
>> input:not(:enabled) { color:gray; }
>>
>> why do you need :disabled then?
> 
> How would you style all disabled controls on your web page?
> 
>   input:not(:enabled), textarea:not(:enabled), select:not(:enabled)
> 
> isn't so readable.  And if you happen to have an XHTML document with 
> XForms tossed in, it's not even correct.
> 

Beg my pardon but this:

   input:not(:enabled), textarea:not(:enabled), select:not(:enabled) {}

is generally nonsense. Because of distinctly different display model of
these elements you will end up with:

input[type=checbox]:not(:enabled) { ... }
input[type=text]:not(:enabled) { ... }

I suspect that your mental modal of :enabled/:disabled pair is better 
definable as:

    :input/:disabled

Where *:input matches all input elements: input, select, textarea, 
object, etc. E.g. :input will match <textarea> but not <a href>



-- 
Andrew Fedoniouk.

http://terrainformatica.com
Received on Friday, 7 November 2008 17:53:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:16 GMT