Re: [SVGMobile12] Interaction of rgba() and -opacity="" should be defined

On 20/05/2005, at 11:52 PM, Ian Hickson wrote:

> The CSS 'color' property can include a fractional opacity component  
> (in
> CSS3), as can the values of the CSS2 system colors (in CSS2).
>
> Since the 'color' property is referencable from SVG (via  
> currentColor),
> and since SVG allows the CSS2 system colors on its attributes, and  
> also
> since when SVG is implemented in a CSS3 UA the <color>-capable  
> properties
> will also take rgba(), etc, please define how a colour with an alpha
> component must be handled when used where SVG explicitly gives a  
> related
> -opacity property.
>
> I can see several options:
>
>  * drop the alpha on the color, use only the -opacity.
>  * drop the -opacity, use only the alpha, unless the alpha is 1.0.
>  * combine the alpha and the -opacity in some defined way.
>
> The latter would be my recommendation.

Good, because there is a well-known method for combining opacities used
in the SVG specification, and your first two options are unacceptable.
We'll take option 3.

I've updated the spec to include explicit description of behaviour in
this situation:

Compositing the currentColor value
===================
The currentColor property may be assigned a color value that
has an opacity component. This opacity value is used in the
rendering operation using the alpha compositing method described
above.(*) That is, the opacity value in currentColor is used when
compositing the color into a paint server (which may
have its own values for opacity).

(*) This section goes directly after Simple Alpha Compositing
in the painting chapter.

Dean

Received on Wednesday, 2 November 2005 16:07:57 UTC