web-platform-tests / interop

web-platform-tests Interop project
https://wpt.fyi/interop
317 stars 28 forks source link

CSS image() function #465

Closed jsnkuhn closed 9 months ago

jsnkuhn commented 1 year ago

Description

The image() function allows an author to:

  • use media fragments to clip out a portion of an image
  • use a solid color as an image
  • fallback to a solid-color image, when the image at the specified url can’t be downloaded or decoded
  • automatically respect the image orientation specified in the image’s metadata

spec fixes many long standing issues with CSS images:

FYI: the above are all from images-4 but the CSSWG is already looking at expanding image() in images-5 for things like background video (https://github.com/w3c/csswg-drafts/issues/6732) and @image-manipulation (https://github.com/w3c/csswg-drafts/issues/6807)

more detailed explainer: https://12daysofweb.dev/2022/css-image/

Specification

https://drafts.csswg.org/css-images-4/#image-notation

Open Issues

There do not appear to be any issues open with the CSSWG specifically about image()

Tests

https://wpt.fyi/results/?label=master&label=experimental&aligned&view=subtest&q=css-image-fallbacks

Current Implementations

Standards Positions

Mozilla: https://github.com/mozilla/standards-positions/issues/856

Browser bug reports

Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=703217 chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=254753#c_ts1639769079 webkit bug: https://bugs.webkit.org/show_bug.cgi?id=72584

(looks like in webkit and firefox put in a considerable amount of work towards this in the early 2010s but then was just abandoned?)

Developer discussions

No response

Polls & Surveys

https://2023.stateofcss.com/en-US/features/

are aware: 2876 have used: 1418

image

1158 added it to their reading list. That's the 10 most added property

image

Existing Usage

No response

Workarounds

There is a postCSS plugin for image(<color>) https://github.com/valtlai/postcss-color-image

Accessibility Impact

No response

Privacy Impact

No response

Other

No response

dandclark commented 9 months ago

Thank you for proposing CSS image() function for inclusion in Interop 2024.

We wanted to let you know that this proposal was not selected to be part of Interop this year.

We could not find any tests for CSS image() function in the Web Platform Tests. Such tests are crucial for measuring interoperability status and progress. Once there are WPT entries covering this proposal, we welcome it being resubmitted for a future round of Interop.

For an overview of our process, see proposal selection. Thank you again for contributing to Interop 2024!

Posted on behalf of the Interop team.