W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2018

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

From: csnardi via GitHub <sysbot+gh@w3.org>
Date: Sun, 28 Jan 2018 20:54:24 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-292237500-1517172862-sysbot+gh@w3.org>
csnardi has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-images] cross-fade() syntax doesn't match implemented webkit-cross-fade() ==
According to [the spec](https://drafts.csswg.org/css-images-3/#cross-fade-function):

> 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))

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2234 using your GitHub account
Received on Sunday, 28 January 2018 20:54:41 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:23 UTC