[webkit-dev] Webkit handling of SVG with rgba() color

David Hyatt hyatt at apple.com
Tue Jun 1 10:30:38 PDT 2010


I think we should support rgba/hsla colors in SVG.

dave

On Jun 1, 2010, at 12:23 PM, Dirk Schulze wrote:

> The SVG 1.1 specification has a reference to CSS2. So from the
> specifications point of view, rgba() shouldn't be supported.
> Nevertheless SVG 1.1se won't have a strict reference to CSS2. Also other
> browsers support rgba on SVG already.
> I'm fine with a rgba implementation and Eric wrote already what is
> needed to support it on the bug report.
> 
> Dirk
> 
>> I was looking at Bug 16183
>> (https://bugs.webkit.org/show_bug.cgi?id=16183) - SVG doesn't support
>> rgba() colors.  I was planning on fixing this but after reading the
>> SVG spec at http://www.w3.org/TR/SVG11/ which states that SVG supports
>> CSS2 color specifications I'm unsure if this should be fixed or not.
>> rgba() was introduced with CSS3 so is technically not supported by
>> SVG.  
>> 
>> 
>> Looking at other implementations Chrome and webkit-head both render a
>> rgba() color as pure black.  Safari 4.0.5 I've seen render it as
>> either black or missing.  Firefox does render it properly.  Batiq
>> fails to render and gives an error: "The attribute "stroke" represents
>> an invalid CSS value ("rgba(0, 255, 0, 0.5)")."  
>> 
>> 
>> Looking at this bug from an end user perspective it would be good to
>> add this feature in as its likely that people will build sites that
>> aren't strictly compliant and would want things to just work.  However
>> I'm always wary of making changes that go against a published standard
>> as that path can lead to ugliness, divergent standards and future
>> headaches.  
>> 
>> 
>> What I'm looking for from the community is feedback on what the right
>> thing to do here with respect to webkit is.  Is it worth the
>> convenience to the user to add support for rgba() to the SVG code? 
>> 
>> 
>> -Jon
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
> 
> 
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev



More information about the webkit-dev mailing list