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

Re: Selectors Tests

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 29 Oct 2008 21:49:54 -0700
Message-ID: <49093CF2.306@mit.edu>
To: Brad Kemper <brkemper.comcast@gmail.com>
CC: www-style <www-style@w3.org>

Brad Kemper wrote:
>> 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.

HTML:

   <input type="text" style="display: none">
   <div>What color is this text?</div>

CSS:

   div { color: red; }
   input[text]:enabled + div { color: green; }

What color is the text?

-Boris
Received on Thursday, 30 October 2008 04:50:52 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:31 UTC