Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[motion-1] Incorrect type definition link in <size> #411

Closed
pyoor opened this issue Oct 22, 2020 · 4 comments
Closed

[motion-1] Incorrect type definition link in <size> #411

pyoor opened this issue Oct 22, 2020 · 4 comments

Comments

@pyoor
Copy link

pyoor commented Oct 22, 2020

The ray() definition syntax links to the <size> definition in css-images-3, however; it appears that ray only accepts a limited number of these arguments: [ closest-side | closest-corner | farthest-side | farthest-corner | sides ]

: <dfn>ray()</dfn> = ray( [ <<angle>> && <<size>> && contain? ] )

I'm not sure what the usual process is for name conflicts among types. Should the <size> definition be replaced with a group defintion containing:
[ closest-side | closest-corner | farthest-side | farthest-corner | sides ]

Or are these types of naming conflicts allowed? And if so, the link in the ray() function should be changed to https://drafts.fxtf.org/motion-1/#valdef-offsetpath-size

@SebastianZ
Copy link
Contributor

I also don't know whether there is a clear note about name conflicts somewhere but there are already some conflicting definitions like for the path() function in Motion 1 vs. Shapes 1 or the element() function (see w3c/csswg-drafts#1981). (But function names are also different because they are exposed to authors in opposite to other data types.)

Disregarding the name conflict, the syntax inside the ray() function obviously means the definition of <size> in that specification and not the one of CSS Images 3.

The question here is, can and should both definitions be merged into one?

In any case, the linking should be fixed for now, so I'll create a PR for that.

Sebastian

@cdoublev
Copy link
Contributor

The question here is, can and should both definitions be merged into one?

In my opinion, they can and should be merged, with specific rules written in prose, because it prevents automatic parsing of value definition.

<path()> would reference the definition of CSS Shapes from Motion and Motion would define that <'fill-rule'> is invalid.

<size> would be merged to

  • closest-side | closest-corner | farthest-side | farthest-corner | sides | <length-percentage>
  • or closest-side | closest-corner | farthest-side | farthest-corner | sides | <length> | <length-percentage>{2}
  • or closest-side | closest-corner | farthest-side | farthest-corner | sides | <length [0,∞]> | <length-percentage [0,∞]>{2}

Motion would define that <length-percentage> is invalid, and CSS Shapes would define that <length [0,∞]> only applies when <basic-shape> is circle and <length-percentage [0,∞]>{2} only applies when <basic-shape> is ellipse.

@tabatkins
Copy link
Member

We should make a single-use production for ray() that has the right keywords.

(Naming conflicts in productions are not allowed, but they do show up. Happy to fix them when they're pointed out.)

@cdoublev
Copy link
Contributor

cdoublev commented Feb 8, 2023

This issue seems to be fixed by 9147ed7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment