W3C home > Mailing lists > Public > www-style@w3.org > January 2005

Re: [CSS3] UI element states pseudo-classes

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sat, 8 Jan 2005 18:42:19 -0800
Message-ID: <001601c4f5f4$d6a85d40$0c01a8c0@TERRA>
To: "Laurens Holst" <lholst@students.cs.uu.nl>, <www-style@w3.org>

There are too many "interesting" states of input elements which make sense
to expose into CSS. For example :changed or :input-error would be pretty 
useful, right?
But I think if we will go this way (declare each state bit as a separate 
class) we will end up with the mess.
And in general: we should avoid declaration of pseudo-classes which can be 
applied to only some particular type of
elements as CSS is more or less universal language/tool.

There are two options I can see: a) input elements should reflect their 
states onto attributes values in runtime
or b) we need to invent some other notation like input[type=text][@changed] 
to allow adding such state flags without
redesigning the whole thing.

Group of radio boxes can live without ":indeterminate" state. E.g. <select> 
lives happily without it and it also has multiple items to select from.
Tristate checkboxes are also something which is hard to imagine visually. It 
is better to use <select> from three options to present your intention 

IMHO of course.

Andrew Fedoniouk.

Original Message from: "Laurens Holst" <lholst@students.cs.uu.nl>
| Andrew Fedoniouk wrote:
| > Reading "UI element states pseudo-classes" [1] I think that make sense:
| >
| > 1)  to remove :checked  pseudo class as it mimics exactly
| > input[type="radio"][checked]  and input[type="checkbox"][checked] 
| > 2)  to remove :enabled  pseudo class as it is enough to have :disabled
| > 3)  to remove:indeterminate as it describes behavior (redundant, btw) of
| > check/radio boxes only and on one particular platform.
| Regarding 1), the 'checked' attribute on input tags is a source thing to
| denote a preselected radio button or checkbox. Checking different boxes
| will not change the source code (just like entering text in an input
| field will not change its 'value' attribute). So input[checked] will not
| apply to the currently checked input fields.
| About 2), removing :enabled, that would be bothersome as well. With
| :enabled you select only the elements which are enabled, and with
| :disabled you only select those which are disabled. If you'd remove
| :enabled, there would be no way to only target the enabled elements
| except by targeting them all, without pseudo-class, and then overriding
| all the properties you set in a :disabled pseudo-class. Not very
| convenient :).
| I don't see a reason to remove 3) for the reason given. I'm unsure what
| you mean exactly by 'platform', whether you are referring to the OS the
| browser is built on or the browser itself. In any case, there are many
| things in CSS which are not supported currently on any platform. I don't
| see why this is different and those platforms could not add
| functionality for an 'indeterminate' checkbox, as tri-state checkboxes
| are quite useful...
| So much for my response :).
| ~Grauw
| -- 
| Ushiko-san! Kimi wa doushite, Ushiko-san!!
Received on Sunday, 9 January 2005 02:42:30 UTC

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