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

Re: Selectors Tests

From: Mikko Rantalainen <mikko.rantalainen@peda.net>
Date: Fri, 07 Nov 2008 12:00:20 +0200
Message-ID: <491411B4.1090700@peda.net>
To: www-style@w3.org
Boris Zbarsky wrote:
> Andrew Fedoniouk wrote:
>> 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.

I'd expect style authors to normally specify style for all controls and
then special case for disabled elements.

Perhaps the spec should forget about using ":enabled". The current spec says
	"The :enabled pseudo-class represents user interface
	elements that are in an enabled state; such elements
	have a corresponding disabled state."

I consider the words "user interace" as the most important part of that
definition. As such, I'd specify ":interactive" as any content that
behaves like some kind of interactive element (e.g. control interface)
regardless of its current state (disabled or not).

I addition, I'd define ":disabled" that matches any content that is
disabled. There probably does not exist content that is not interactive
but is disabled so any content that matches not(:interactive) should
never match :disabled. What would p:disabled mean anyway? A paragraph
that cannot be used? Or something else?

The should not be ":enabled" or ":noninteractive".

-- 
Mikko


Received on Friday, 7 November 2008 10:01:10 GMT

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