RE: [css3-images] Gradients feedback

Boris Zbarsky wrote:
> Agreed.  Note that SVG colors always have alpha == 1, so you can't have a
> gradient with non-opaque colors or stops in SVG.  So no matter what we do
> here it'll be consistent with SVG as it stands now.

I found this assertion surprising.

Opera, Safari, and IE9 PPB4 consider rgba acceptable for stop colors.  Firefox seems to agree with Boris, rejecting rgba in stop colors.

-Brian


<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="8cm" height="4cm" viewBox="0 0 800 800" version="1.1"
     xmlns="http://www.w3.org/2000/svg">
  <desc>Example lingrad01 - fill a rectangle using a 
           linear gradient paint server</desc>
  <g>
    <defs>
      <linearGradient id="MyGradient1">
        <stop offset="5%" stop-color="rgb(255,0,0)" />
        <stop offset="95%" stop-color="rgb(0,0,255)" />
      </linearGradient>
      <linearGradient id="MyGradient2">
        <stop offset="5%" stop-color="rgba(255,0,0,0.5)" />
        <stop offset="95%" stop-color="rgba(0,0,255,0.1)" />
      </linearGradient>
    </defs>

    <!-- Outline the drawing area in blue -->
    <rect fill="none" stroke="blue" 
          x="1" y="1" width="798" height="798"/>

    <!-- The rectangle is filled using a linear gradient paint server -->
    <rect fill="url(#MyGradient1)" stroke="black" stroke-width="5"  
          x="100" y="100" width="600" height="200"/>
    <rect fill="url(#MyGradient2)" stroke="black" stroke-width="5"  
          x="100" y="400" width="600" height="200"/>
  </g>
</svg>

Received on Friday, 10 September 2010 20:17:48 UTC