W3C home > Mailing lists > Public > www-style@w3.org > March 2004

Re: Opacity and nth-child

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sun, 28 Mar 2004 21:28:48 -0500
Message-Id: <200403290228.i2T2SmVA004722@no-knife.mit.edu>
To: "Sean M. Hall" <pianoman@reno.com>
Cc: www-style@w3.org

> I've tweaked the test of Opacity and added a span to see if the span
> inherited opacity

It better not... Opacity is not inherited, but is applied to the entire element
and all its children as a single atomic operation.  In fact, as I understand
it, the following testcase:

<div style="opacity: 0.5"><span>0.5</span></div>
<div style="opacity: 0.5"><span style="opacity: inherit">0.25</span></div>
<div style="opacity: 0.25"><span>0.25</span></div>

Should show the two "0.25" texts as being equally opaque and both less opaque
than the "0.5" text.

"This isn't right.  This isn't even wrong."

                -- Wolfgang Pauli on a paper submitted 
                   by a physicist colleague
Received on Sunday, 28 March 2004 21:29:00 UTC

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