- From: L. David Baron <dbaron@dbaron.org>
- Date: Wed, 29 Oct 2008 21:47:46 -0700
- To: Brad Kemper <brkemper.comcast@gmail.com>
- Cc: Boris Zbarsky <bzbarsky@MIT.EDU>, Lachlan Hunt <lachlan.hunt@lachy.id.au>, fantasai <fantasai.lists@inkedblade.net>, www-style <www-style@w3.org>
On Wednesday 2008-10-29 21:36 -0700, Brad Kemper wrote: > On Oct 29, 2008, at 2:41 PM, Boris Zbarsky wrote: >> Lachlan Hunt wrote: >>> Most elements will be neither enabled nor disabled. An element is >>> enabled if the user can either activate it or transfer the focus to >>> it. An element is disabled if it could be enabled, but the user >>> cannot >>> presently activate it or transfer focus to it. >> >> So should an <input type="text" style="display: none"> match :disabled, >> by that reasoning? > > Is that a purely philosophical question, or does it matter somehow? > Given that it is not rendered and takes up no space, and that it will > not be disabled if display changes to something other than "none", then > matching or not would seem to make little or no difference. I think Boris's point is that the definition has to be written such that the value of CSS properties has no influence on whether selectors match. At least I hope that was his point. (The definition of which elements should match :disabled could perhaps be left to the underlying markup language. However, Lachlan's definition clearly allows too many factors to influence that matching.) Whether an element is display:none absolutely cannot change whether it matches disabled; otherwise we'd have big problems with :disabled { display: inline ! important; } -David -- L. David Baron http://dbaron.org/ Mozilla Corporation http://www.mozilla.com/
Received on Thursday, 30 October 2008 04:48:52 UTC