web-platform-tests / interop

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

CSS Painting API Level 1 (houdini) #496

Closed jsnkuhn closed 9 months ago

jsnkuhn commented 1 year ago

Description

from Mozilla:

This specification allows developing prototypes of new graphical CSS features and provides an escape hatch for developers when the existing features aren't good enough for a particular piece of a web page.

from spec:

The CSS Paint API is being developed to improve the extensibility of CSS.

Specifically this allows developers to write a paint function which allows us to draw directly into an elements background, border, or content.

Specification

https://drafts.css-houdini.org/css-paint-api/

Open Issues

https://github.com/w3c/css-houdini-drafts/issues?q=is%3Aissue+is%3Aopen+paint+api+label%3Acss-paint-api-1

Tests

https://wpt.fyi/results/css/css-paint-api?label=experimental&label=master&aligned&view=subtest

Current Implementations

Standards Positions

Mozilla position is positive (https://mozilla.github.io/standards-positions/#css-paint-api) webkit is in development

Browser bug reports

chromium: implemented safari ("in development"): https://bugs.webkit.org/show_bug.cgi?id=190217 firefox ("under consideration"): https://bugzilla.mozilla.org/show_bug.cgi?id=1302328

Developer discussions

No response

Polls & Surveys

No response

Existing Usage

No response

Workarounds

There's a polyfill (https://github.com/GoogleChromeLabs/css-paint-polyfill) but must admit that it hasn't performed so great for me. Sometimes just flat out doesn't respond in Firefox at all. (Maybe because it piggy backs on -moz-element() which isn't fully implemented in FF?)

Worth noting that including the polyfill sometimes kills the benefits of the paintAPI. One of the big paintAPI wins is complex images in a small file size. If you have to include an extra file download (the poylfill) on top of the paint worklet then the overall file size associated with using the paintAPI becomes larger and you might just be better off using an image.

Accessibility Impact

No response

Privacy Impact

No response

Other

If only one of the Houdini APIs is chosen again this year i believe it is better to go with TypedOM. So that it is in place and usable when the PaintAPI is ultimately added.

dandclark commented 9 months ago

Thank you for proposing CSS Painting API Level 1 (houdini) for inclusion in Interop 2024.

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

This is because we got many more proposals than we could include in this year's project. Note that individual vendors may nevertheless choose to advance work in this area during the forthcoming year. We would welcome this proposal being resubmitted again next year if necessary.

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

Posted on behalf of the Interop team.