Skip to content

[css-images] cross-fade() syntax doesn't match implemented webkit-cross-fade() #2234

Open
@csnardi

Description

@csnardi

According to the spec:

The syntax for cross-fade() is defined as:

cross-fade() = cross-fade( <cf-mixing-image> , <cf-final-image>? )
<cf-mixing-image> = <percentage>? && <image>
<cf-final-image> = <image> | <color>

However, the implementation of webkit-cross-fade() in Chrome/Safari has the percentage at the end, and a comma in between the percent and the image. Safari has also un-prefixed cross-fade(). I'm not sure what the relevant use of webkit-cross-fade()/cross-fade() is, but perhaps it would make sense to match the syntax to Safari/Chrome's current implementation as they are currently the only two implementations of cross-fade().

The current implementation in Safari would look like:

cross-fade(url(foo.png), url(bar.png), 20%)

And per the spec:

cross-fade(20% url(foo.png), url(bar.png))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions