- From: Mikko Rantalainen <mikko.rantalainen@peda.net>
- Date: Fri, 07 Nov 2008 12:00:20 +0200
- To: www-style@w3.org
- Message-ID: <491411B4.1090700@peda.net>
Boris Zbarsky wrote: > Andrew Fedoniouk wrote: >> It means that either one :enabled or :disabled is just enough for >> practical needs. >> >> input:not(:enabled) { color:gray; } >> >> why do you need :disabled then? > > How would you style all disabled controls on your web page? > > input:not(:enabled), textarea:not(:enabled), select:not(:enabled) > > isn't so readable. And if you happen to have an XHTML document with > XForms tossed in, it's not even correct. I'd expect style authors to normally specify style for all controls and then special case for disabled elements. Perhaps the spec should forget about using ":enabled". The current spec says "The :enabled pseudo-class represents user interface elements that are in an enabled state; such elements have a corresponding disabled state." I consider the words "user interace" as the most important part of that definition. As such, I'd specify ":interactive" as any content that behaves like some kind of interactive element (e.g. control interface) regardless of its current state (disabled or not). I addition, I'd define ":disabled" that matches any content that is disabled. There probably does not exist content that is not interactive but is disabled so any content that matches not(:interactive) should never match :disabled. What would p:disabled mean anyway? A paragraph that cannot be used? Or something else? The should not be ":enabled" or ":noninteractive". -- Mikko
Received on Friday, 7 November 2008 10:01:10 UTC