- From: Tantek Çelik <tantek@cs.stanford.edu>
- Date: Wed, 20 Mar 2002 11:37:00 -0800
- To: Daniel Steinberger <Daniel.Steinberger@gmx.de>, "Tantek Çelik (Microsoft Corporation)" <tantekc@microsoft.com>, "Chris Lilley (W3C)" <chris@w3.org>, "Steven Pemberton (CWI)" <steven.pemberton@cwi.nl>, "Brad Pettit (Microsoft Corporation)" <bradp@microsoft.com>, www-style@w3.org
The ability to control opacity on particular pieces of an element is provided by the new rgba() or hsla() color values as defined in the CSS3 Color Module. For background image transparency, use PNG. The working group considered, but decided against, introducing new properties such as you propose, because we would have had to have introduced several new properties: background-opacity foreground-opacity text-decoration-opacity border-opacity (perhaps also border-top-opacity, border-right-opacity, border-bottom-opacity, border-left-opacity) outline-opacity This would have been necessary because although you assert that foreground-opacity would apply to the border, it was also shown that one might want the border to be as transparent as the background. As such, we couldn't assume that foreground-opacity would have (or have not) applied to text-decoration and outline etc. It is much simpler to introduce 2 new color value types which can then be used with all properties that specify a color, rather than add 5-9 new properties. In addition, the new color value types permit controlling the opacity of these pieces of elements independently of elements' children, which the opacity property does affect. As far as inheriting the property, for consistency, all properties in CSS2 (and CSS3 for that matter) accept the 'inherit' value. Regarding accepting percentages for opacity - given how percentage values work for other types (typically depending on the parent), it was decided that it would have been confusing to allow percentage on opacity, since that percentage would not be a percentage of some property of the parent. So, for simplicity and clarity, it was decided to just use <alphavalue>. Thanks for your feedback, Tantek On 3/20/02 8:40 AM, "Daniel Steinberger" <Daniel.Steinberger@gmx.de> wrote: > Dear editors, > > I'd like to make a proposal to the 'opacity' > [http://www.w3.org/TR/css3-color/#opacity] > property of the 'CSS3 module: Color' module. > > ... > > So now my proposal: > > I suggest introducing > properties for each nessesary type of elements: > > Name: opacity-background > > ... > > Name: opacity-foreground > > ... > > Note 1: As described in the paragraph about inheriting > the property, I don't see the use of being able to > inherit the value. > > ... > > Note 2: I think it might be OK to permit percentages as > well, since they can be easily translated to <alphavalues> > (e.g. '20%' corresponds to '0.2'). > > ... > > Please consider my feedback and let me know your opinion > about this proposal. Thank you very much. > > --Daniel Steinberger >
Received on Wednesday, 20 March 2002 14:34:23 UTC