W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: Custom dynamic properties

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 17 Sep 2010 13:08:31 -0700
Message-ID: <AANLkTik0bE_46j3nP-gyds7zTC_K_dqOh+_2Vt6i344q@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-style <www-style@w3.org>
On Fri, Sep 17, 2010 at 10:54 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 9/17/10 1:42 PM, Tab Atkins Jr. wrote:
>>
>> What difference do you think there is between pseudoclasses and
>> attribute selectors?  Other than the fact that they refer to different
>> things, they're fairly similar.
>
> Pseudo classes can be defined arbitrarily, in general, whereas what
> attribute selectors can do is very restricted.
>
> For example, there's no sane way to write an attribute selector for "tables
> with a nonzero border attribute" (in the sense that affects HTML rendering).
>  One could define a pseudo-class that does that, though.

Right, that would be the "refer to different things" part.  ^_^

>> :enabled and :disabled were presumably introduced for parsimony with
>> the other input-state-based pseudoclasses.  It's also easier to write
>> them than [disabled] and :not([disabled])
>
> :disabled and [disabled] will match different sets of elements, in general.
>
> :disabled and :not(:enabled) will match different sets of elements, in
> general.
>
> See http://www.w3.org/TR/2004/CR-css3-ui-20040511/ section 6.6.4.1 paragraph
> 3 second sentence:
>
>  In a typical document most elements will be neither :enabled nor
>  :disabled.

Argh, right.  Yeah, only input elements, typically, can be enabled or disabled.

~TJ
Received on Friday, 17 September 2010 20:09:23 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:31 GMT