shape() allows responsive custom shapes in CSS properties that accept a shape, currently limited to clip-path. It lets the author define a series of commands, equivalent to the commands in path(), but where the commands accept responsive units (e.g. % or vw), as well as any CSS values such as custom properties or rather than pixel-values. See https://drafts.csswg.org/css-shapes-2/#shape-function
None
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
None
https://wpt.fyi/results/css/css-shapes/shape-functions?label=master&label=experimental&aligned&q=shape (anything beginning with shape-) https://wpt.fyi/results/css/css-masking/clip-path?label=master&label=experimental&aligned&q=shape and https://wpt.fyi/results/css/css-masking/clip-path/animations?label=master&label=experimental&aligned&q=shape (clip-path-shape-*)
Shipping on desktop | 135 |
DevTrial on desktop | 134 |
Shipping on Android | 135 |
DevTrial on Android | 134 |
Shipping on WebView | 135 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
NoneThe TAG review link is missing but I see you’ve got one in progress here: https://github.com/w3ctag/design-reviews/issues/1033
Regarding the tests:
> https://wpt.fyi/results/css/css-shapes/shape-functions?label=master&label=experimental&aligned&q=shape (anything beginning with shape-) https://wpt.fyi/results/css/css-masking/clip-path?label=master&label=experimental&aligned&q=shape and https://wpt.fyi/results/css/css-masking/clip-path/animations?label=master&label=experimental&aligned&q=shape (clip-path-shape-*)
I am trying to understand why these are still mostly failing in Chrome Experimental. The CSSShapeFunction flag has status “experimental” so I’d expect it to be enabled for the Chrome Experimental WPT results, but in the links you shared most of the subtests for shape() still don’t pass. Are the tests or implementation still in flux, or do you know of something else I might be missing here?
As a sidenote, Firefox also seems to have done some work on this: https://bugzilla.mozilla.org/show_bug.cgi?id=1823463. Some but not all of the tests are passing on Firefox Nightly.
-- Dan Clark
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
blink-dev+...@chromium.org.
To view this discussion visit
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/67914a1a.2b0a0220.236503.0179.GAE%40google.com.
The TAG review link is missing but I see you’ve got one in progress here: https://github.com/w3ctag/design-reviews/issues/1033
Regarding the tests:
> https://wpt.fyi/results/css/css-shapes/shape-functions?label=master&label=experimental&aligned&q=shape (anything beginning with shape-) https://wpt.fyi/results/css/css-masking/clip-path?label=master&label=experimental&aligned&q=shape and https://wpt.fyi/results/css/css-masking/clip-path/animations?label=master&label=experimental&aligned&q=shape (clip-path-shape-*)
I am trying to understand why these are still mostly failing in Chrome Experimental. The CSSShapeFunction flag has status “experimental” so I’d expect it to be enabled for the Chrome Experimental WPT results, but in the links you shared most of the subtests for shape() still don’t pass. Are the tests or implementation still in flux, or do you know of something else I might be missing here?
As a sidenote, Firefox also seems to have done some work on this: https://bugzilla.mozilla.org/show_bug.cgi?id=1823463. Some but not all of the tests are passing on Firefox Nightly.
Contact emails nrose...@chromium.org
Explainer None
Specification https://drafts.csswg.org/css-shapes-2/#shape-function
Summaryshape() allows responsive custom shapes in CSS properties that accept a shape, currently limited to clip-path. It lets the author define a series of commands, equivalent to the commands in path(), but where the commands accept responsive units (e.g. % or vw), as well as any CSS values such as custom properties or rather than pixel-values. See https://drafts.csswg.org/css-shapes-2/#shape-function
Blink component Blink>CSS
TAG review None
TAG review status Pending
Risks
Interoperability and CompatibilityNone
Gecko: No signal (https://github.com/mozilla/standards-positions/issues/1153)
WebKit: Positive (https://bugs.webkit.org/show_bug.cgi?id=238371) Safari has already implemented this, available in STP.
Web developers: Positive See citations: https://jamesmcgrath.net/scaling-svg-clippath/ https://css-tricks.com/unfortunately-clip-path-path-is-still-a-no-go/ https://stackoverflow.com/questions/29495919/how-to-apply-clippath-to-a-div-with-the-clippath-position-being-relative-to-the https://stackoverflow.com/questions/31210466/convert-svg-path-data-to-0-1-range-to-use-as-clippath-with-objectboundingbox https://stackoverflow.com/questions/53618192/create-responsive-svg-clip-path-making-svg-path-responsive
Other signals:
WebView application risksDoes this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
DebuggabilityNone
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)? Yes
Is this feature fully tested by web-platform-tests? Yeshttps://wpt.fyi/results/css/css-shapes/shape-functions?label=master&label=experimental&aligned&q=shape (anything beginning with shape-) https://wpt.fyi/results/css/css-masking/clip-path?label=master&label=experimental&aligned&q=shape and https://wpt.fyi/results/css/css-masking/clip-path/animations?label=master&label=experimental&aligned&q=shape (clip-path-shape-*)
Flag name on about://flags CSSShapeFunction
Finch feature name CSSShapeFunction
Requires code in //chrome? False
Tracking bug https://issues.chromium.org/issues/40829059
Estimated milestones Shipping on desktop 135 DevTrial on desktop 134 Shipping on Android 135 DevTrial on Android 134 Shipping on WebView 135
Anticipated spec changesOpen questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
None
This overall seems promising, but a few inline comments. The only blocking one is the question about open spec edits.On Thursday, January 23, 2025 at 4:42:34 AM UTC+9 Chromestatus wrote:Contact emails nrose...@chromium.org
Explainer NoneI was able to piece together an explainer by looking through the spec and its examples. In the future, pointing to them a bit more directly, or pulling them out into a paragraph or two, would be helpful.
DebuggabilityNone
Do we currently have any special DevTools support for clip-path()? If so, we might want to consumer the same thing for shape().
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)? Yes
Is this feature fully tested by web-platform-tests? Yeshttps://wpt.fyi/results/css/css-shapes/shape-functions?label=master&label=experimental&aligned&q=shape (anything beginning with shape-) https://wpt.fyi/results/css/css-masking/clip-path?label=master&label=experimental&aligned&q=shape and https://wpt.fyi/results/css/css-masking/clip-path/animations?label=master&label=experimental&aligned&q=shape (clip-path-shape-*)
Flag name on about://flags CSSShapeFunctionI don't think this is an about://flags flag. (At least, I don't see one in my Chrome Dev.) Probably it's best to remove this from ChromeStatus.
Finch feature name CSSShapeFunction
Requires code in //chrome? False
Tracking bug https://issues.chromium.org/issues/40829059
Estimated milestones Shipping on desktop 135 DevTrial on desktop 134 Shipping on Android 135 DevTrial on Android 134 Shipping on WebView 135
Anticipated spec changesOpen questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
Nonehttps://github.com/w3c/csswg-drafts/labels/css-shapes-2 has quite a lot of open issues. Several of them relate to shape(), I believe:
Could you comment on these (and any others I might have missed) to let us know if any of them reflect either (a) potential backward-incompatible changes (#10647 seems especially scary in that regard), or (b) mismatches between the currently live spec and our implementation? If they are just potential future backward-compatible enhancements then that's fine, but I can't tell at a glance whether that's the case for all of them.
On Mon, Jan 27, 2025 at 2:56 AM Domenic Denicola <dom...@chromium.org> wrote:This overall seems promising, but a few inline comments. The only blocking one is the question about open spec edits.On Thursday, January 23, 2025 at 4:42:34 AM UTC+9 Chromestatus wrote:
Anticipated spec changesOpen questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
Nonehttps://github.com/w3c/csswg-drafts/labels/css-shapes-2 has quite a lot of open issues. Several of them relate to shape(), I believe:
This one is not actionable and doesn't affect shape(), it's about path().
This one is not actionable and doesn't affect shape(), it's about path().I think "not actionable" isn't a great way to describe this issue: Lea's suggesting that this functionality be provided as part of the `path()` function and that `shape()` not be defined at this time. That's a concrete action that affects `shape()`.
This one is not actionable and doesn't affect shape(), it's about path().I think "not actionable" isn't a great way to describe this issue: Lea's suggesting that this functionality be provided as part of the `path()` function and that `shape()` not be defined at this time. That's a concrete action that affects `shape()`.My bad, I mixed it with #9889. it does affect `shape()` as in proposing to do something else instead, which is described in general terms (which is what I mean by "not actionable", I should have been more specific).
LGTM2
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/f571ae30-5d66-44b7-999d-12d06a8b0123n%40chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.