-
Notifications
You must be signed in to change notification settings - Fork 131
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
Allow multiple radii for rx & ry in <rect> as per CSS border-radius #58
Comments
What about just supporting the border-radius property? |
I considered that, but thought that:
|
Stroke does map to border, whenever we have to mix CSS and SVG box model terms. Ugh, I was going to suggest we can address the collision by making rx/ry just be shorthands for the border-radius properties, but we don't currently break those properties apart far enough - we just have the four corners, each of which accepts two values for the x and y. To do the shorthanding we'd need a property for just the x part of a corner. (We could try and add this, of course.) |
My instinct is to say keep them separate. Strokes are not borders, none of the other border properties apply. They wouldn't make sense if they did, because borders have separate top/right/bottom/left values, but those options don't make sense for non-rectangular shapes. That said: If we adopt a syntax for declaring path geometry that uses CSS shapes functions in general (as opposed to only allowing the |
I also don't like the idea of calling it "border-radius". The term stroke is clearly defined and used consistently all over the place in the SVG spec, there is e.g. Being only partially consistent with HTML here would be in my opinion more confusing than not being consistent at all. |
These are all great points and I now agree that border-radius is just a bad idea.. apologies for the tangent. Reusing the syntax but under a different name makes sense to me. |
There has been some discussion about this kind of feature in the past [1]. The idea was to extend 'rx' and 'ry' properties and also to add 'r' property for paths, so that any path corner could be rounded. Anyway, I give a thumbs up for this feature. :) |
Suggestion:
Allow the
rx
andry
attributes of<rect>
to accept up to four radius values. If there are 2-4 values specified then they would be handled the same way that CSSborder-radius
is.The text was updated successfully, but these errors were encountered: