Re: Opacity applying to child elements

Le Ven 18 janvier 2013 9:12, Mohammed Kashim a écrit :
> When applying opacity to say a div, it is also applied to anything within
> the div.


Can you upload a reduced test on an accessible webpage showing,
demonstrating this?


> There are various different hacks to get around this and they all
> work fairly well but the opacity property should have a way to specify if
> it is applied to all child elements or only the element which is targeted.
>
> Mo

"
Name: 	opacity
(...)
Inherited: 	no
(...)
If the object is a container element, then the effect is as if the
contents of the container element were blended against the current
background using a mask where the value of each pixel of the mask is
<alphavalue>.
"
3.2. Transparency: the 'opacity' property
http://www.w3.org/TR/css3-color/#transparency

When applying opacity to a container div, then it should not apply and
does not apply to its children.

Gérard
-- 
CSS 2.1 Test suite RC6, March 23rd 2011
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

Contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

Web authors' contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html

Received on Saturday, 19 January 2013 03:42:17 UTC