-
Notifications
You must be signed in to change notification settings - Fork 132
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
Initial value for the 'rx' and 'ry' properties #74
Comments
Thanks for catching this. Yes, an A further question is do we want to assign this default only to Currently, an ellipse would not be drawn at all if the And if we're going to make it possible to declare an ellipse that is actually a circle controlled by a single radius, it would be nice to make (A demo for anyone confused about the current interpretation of percentages in all these cases. Note that the circle is being clipped to the SVG dimensions. Also note that the percentages in the rectangle's radii attributes are relative to the coordinate system (SVG) dimensions, not to the rectangles width and height, which just happens to be the same for clarity.) |
I suggest just using
We should go ahead and align the behavior; the difference isn't interesting/intentional. Why do you think it would cause a circle? It should just copy the value over as it is, so %s stay as %s, causing an ellipse with the same aspect ratio as the container.
Right, so unfortunately we cannot make Given the " (Or, hmm, we could do it automatically by having the third property default to |
That's not how it works for rounded rectangles (see my linked demo). The computed value is duplicated over, not the percentage, so you always have a circular arc. But as you say, it is only a problem if we want to define this all in terms of shorthand. Just having |
Ahhhh, indeed. My tests were showing "50%" on So yeah, |
Is the value "auto" also supposed be listed in the "Value" field of the info box? |
I think that the steps (after the fourth paragraph) at https://svgwg.org/svg2-draft/shapes.html#RectElement could use some touchup too. |
Thanks @BigBadaboom and @fsoder. Should have been looking at both sections together. I'm not sure why I thought that only ry would match rx and not vice versa. Looks like both need to have an |
Updated https://svgwg.org/svg2-draft/geometry.html#RX to include both auto cases (and to ensure that Needs some markup cleanup to get property names/values highlighted consistently. Still need to clean up the corresponding sections in the Basic Shapes chapter. |
The required edits to basic shapes were merged into master via 1947fd3. |
The initial value for the 'rx' and 'ry' properties are currently specified [1] as being '0'. This however means that it isn't possible to distinguish 'not specified', which is referred to in [2]:
and
et.c.
(This currently causes a bug in Blink, ref [3].)
[1] https://svgwg.org/svg2-draft/geometry.html#RX
[2] https://svgwg.org/svg2-draft/shapes.html#RectElement
[3] https://bugs.chromium.org/p/chromium/issues/detail?id=576811
The text was updated successfully, but these errors were encountered: