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

Re: Styling by attribute-based association?

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 16 Oct 2008 21:32:38 +0000 (UTC)
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Cc: David Hyatt <hyatt@apple.com>, W3C CSS <www-style@w3.org>
Message-ID: <Pine.LNX.4.62.0810162127020.1041@hixie.dreamhostps.com>

On Thu, 16 Oct 2008, Daniel Glazman wrote:
> Ian Hickson wrote:
> 
> > I agree that it should be up to the markup specs to define which of 
> > these state-based pseudo-classes should apply to which elements. 
> > Should we define a set of common terms so that specs can "interface" 
> > on this issue, or would it be better for specs to just name 
> > pseudo-classes explicitly?
> 
> I don't understand. Do you mean name the existing state pseudo-classes 
> or potentially name/define new ones? About the former, it's probably in 
> the markup language's hands ; the latter is clearly on CSS WG's radar.

I mean, should the specs say:

    HTML
    The input element represents a two-state control that represents the 
    element's checkedness state. If the element's checkedness state is 
    true, the control represents a positive selection, and if it is false, 
    a negative selection. While the element's checkedness state is true, 
    the element is *in a pseudo-checked state*.

    CSS
    The :checked pseudo-class matches elements that are *in a 
    pseudo-checked state*.

...or should the specs say:

    HTML
    The input element represents a two-state control that represents the 
    element's checkedness state. If the element's checkedness state is 
    true, the control represents a positive selection, and if it is false, 
    a negative selection. While the element's checkedness state is true, 
    the element *matches the :checked pseudo-class*.

    CSS
    The following pseudo-classes exist:
      :checked
      ...
    What they match is defined in other specifications.

The advantage of the former technique is that other specifications (e.g. 
XPath) can later come along and hook into the term we invent, thus keeping 
everything consistent. The advantage of the latter technique is that it is 
simpler for everyone to understand the implications of the requirements.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 16 October 2008 21:33:13 GMT

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