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

Re: Styling by attribute-based association?

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Thu, 16 Oct 2008 08:54:35 -0700
Message-ID: <48F763BB.7010500@terrainformatica.com>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
CC: David Hyatt <hyatt@apple.com>, Ian Hickson <ian@hixie.ch>, Matthew Raymond <mattraymond@earthlink.net>, W3C CSS <www-style@w3.org>

Daniel Glazman wrote:
> David Hyatt wrote:
>> Another (IMO simpler) idea would be to just have label match the same 
>> pseudo-classes that the control does, i.e., if a checkbox is :checked, 
>> then the label can match :checked too.  Same for :disabled, :enabled, 
>> :indeterminate, and :focus.  I don't see any reason to introduce new 
>> selectors to solve this problem.
> Let's go back in time for a second since this issue was raised precisely
> 3 years ago : my opinion as both Selectors' editor and CSS WG
> co-chairman is that this issue is outside of the scope of the CSS
> Working Group and it's up to the markup language to state that this or
> that state set on the control is mirrored onto the label having a
> |for| attribute targeting that control. To summarize, it's IMHO an
> HTML5 issue.
> Of course, that's just me but I'll support that idea until my last drop
> of blood ;-)

The ultimate way of preventing CSS WG co-chairmans from perishing on 

1) Add 'checkbox' and 'radio' to the list of allowed values of
    the 'type' attribute of the <button>.
2) To enable CSS on the element.

So you can define this:

<button type="radio">Click Me!</button>
<button type="radio">Or Me!</button>

without the need of that artificial label thing at all.

Andrew Fedoniouk.

Received on Thursday, 16 October 2008 16:07:02 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:40 UTC