- From: Rik Cabanier <cabanier@gmail.com>
- Date: Fri, 18 Jan 2013 19:46:22 -0800
- To: www-style@gtalbot.org
- Cc: Mohammed Kashim <me@mgakashim.com>, W3C www-style mailing list <www-style@w3.org>
- Message-ID: <CAGN7qDA+4URwUW44YDsfdg6ob8hzssdZqdcG__vGUz=ucp4x_g@mail.gmail.com>
Maybe what he's looking for is applying opacity to the background but not the child elements. Applying opacity will create a stacking context/offscreen bitmap that contains the element and all its children. This bitmap will be composited with alpha. On Fri, Jan 18, 2013 at 7:41 PM, "Gérard Talbot" <www-style@gtalbot.org>wrote: > > 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:46:49 UTC