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

Re: Selectors Tests

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Thu, 06 Nov 2008 17:28:13 -0800
Message-ID: <491399AD.6020100@terrainformatica.com>
To: fantasai <fantasai.lists@inkedblade.net>
CC: Boris Zbarsky <bzbarsky@MIT.EDU>, Patrick Garies <pgaries@fastmail.us>, www-style@w3.org

fantasai wrote:
>
> Boris Zbarsky wrote:
>>
>> Patrick Garies wrote:
>>> The following wording seems to do all of the above:
>>>
>>> “The |:enabled| pseudo‐class represents user interface elements that 
>>> are in an enabled state; such elements have a corresponding disabled 
>>> state.
>>>
>>> Analogously, the |:disabled| pseudo‐class represents user interface 
>>> elements that are in a disabled state; such elements have a 
>>> corresponding enabled state.
>>>
>>> What constitutes an enabled state, a disabled state, and applicable 
>>> user interface elements is language‐dependent.
>>>
>>> Note that CSS properties that might affect a user’s ability to 
>>> interact with a given user interface element do not affect whether 
>>> it matches |:enabled| or |:disabled|; e.g., the |display| and 
>>> |visibility| properties have no effect on the enabled/disabled state 
>>> of an element.”
>>
>> For what it's worth, I like this proposal.
>
> Me, too. Spec updated:
>   http://dev.w3.org/csswg/selectors3/#UIstates
>
> I replaced "Analogously" with "Conversely", and I also left in the
> statement "Most elements will be neither enabled nor disabled."
>
Having both :disabled and :enabled creates conditions when following 
statements are true:

:disabled  != :not(:enabled)
:enabled  != :not(:disabled)
not(:enabled)  && :not(:disabled) == true
:enabled  && :disabled == true

Is this desired?

In general: what about domain (language) specific attributes?
I believe that CSS should not try to define all possible state flags but 
rather
to define general rule: each language  (e.g. XUL, HTML, etc) should be 
allowed to define
their own domain specific pseudo-classes. CSS spec. just need to define 
common syntax for them -
pseudo-class is some name token that defines some state flag. HTML5 spec 
or WF shall define those state
flags with precise definition what they mean. E.g. they may specify that 
:enabled == true and :disabled == true are
not possible at any given moment of time.

--
Andrew Fedoniouk.

http://terrainformatica.com
















>
> ~fantasai
>
>
Received on Friday, 7 November 2008 01:28:57 GMT

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