[Webkit-unassigned] [Bug 195549] New: Support opacity in stop-color attribute for SVG <stop> element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 11 03:27:37 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=195549

            Bug ID: 195549
           Summary: Support opacity in stop-color attribute for SVG <stop>
                    element
           Product: WebKit
           Version: Safari 12
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: SVG
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: dan at moqups.com
                CC: zimmermann at kde.org

The SVG 2 specification states that the `stop-color` attribute in <stop> elements should support CSS Color Level 3 values, which includes the `rgba()` variant with an explicit opacity value. Furthermore, it states that:

> For stop-color value types of that don't include explicit opacity information, the opacity of that component must be treated as 1.

Reference: https://www.w3.org/TR/SVG2/pservers.html#StopColorProperties

Safari (version 12) does not currently support specifying the stop's opacity as part of the stop-color attribute. 

Example SVG:

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="100" viewBox="0 0 100 100" >
 <defs>
        <linearGradient id="gradient" gradientUnits="userSpaceOnUse">
            <stop offset="0" stop-color='rgba(255,0,0,0.5)'/>
            <stop offset="1" stop-color='rgba(0,255,0,0.5)'/>
        </linearGradient>
</defs>
<rect fill="url(#gradient)" width="100" height="100"/>
</svg>

(This renders correctly in current versions of Firefox and Chrome.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190311/9c3bc5aa/attachment.html>


More information about the webkit-unassigned mailing list