Skip to content

[css-shapes][css-images-3] <radial-size> syntax seems incorrect #10812

Open
@romainmenke

Description

@romainmenke

https://drafts.csswg.org/css-images-3/#typedef-radial-size

<radial-size> = <radial-extent> | <length [0,∞]> | <length-percentage [0,∞]>{2}

This syntax does not allow this:

clip-path: ellipse(closest-side closest-side at 5rem 6rem);

Despite that being the implemented feature: https://codepen.io/romainmenke/pen/PordyZx

I think this was a regression in #9723

Grouping it seems to resolve the issue:

<radial-size> = [ <radial-extent> | <length [0,∞]> | <length-percentage [0,∞]> ]{2}

But I am not that familiar with the feature, so my suggestion might be incorrect.


Edit:

The suggested edit would break circle().
I think that that might be the root cause.

That both circle() and ellipse() are defined with <radial-size> while they should be different.

This might work though:

https://drafts.csswg.org/css-images-3/#typedef-radial-size

- <radial-size> = [ <radial-extent> | <length [0,∞]> | <length-percentage [0,∞]> ]{2}
+ <radial-size> = [ <radial-extent> | <length [0,∞]> | <length-percentage [0,∞]> ]

https://drafts.csswg.org/css-shapes/#funcdef-basic-shape-ellipse

- <ellipse()> = ellipse( <radial-size>? [ at <position> ]? )
+ <ellipse()> = ellipse( [ <radial-size>{2} ]? [ at <position> ]? )

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions