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

Re: Custom dynamic properties

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 17 Sep 2010 13:54:47 -0400
Message-ID: <4C93AB67.3080007@mit.edu>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: www-style <www-style@w3.org>
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.

> :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 

See http://www.w3.org/TR/2004/CR-css3-ui-20040511/ section 
paragraph 3 second sentence:

   In a typical document most elements will be neither :enabled nor

Received on Friday, 17 September 2010 17:55:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:49:47 UTC