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

Define a style switch to allow one-dimensional shapes to render strokes, markers, etc. #236

Open
AmeliaBR opened this issue Aug 18, 2016 · 1 comment

Comments

@AmeliaBR
Copy link
Contributor

As discussed in #235, the rule that SVG rect, circle, and ellipse do not render when any of the key geometric sizing properties are zero is inconsistent with the behavior for their equivalent path.

For example, a path that draws out a zero-height rectangle would still get stroked as a line. A path consisting of zero-length arc commands would still be stroked as a single line-cap dot. Markers on the shape would also render as normal (albeit with multiple markers super-imposed on the same points!).

It was therefore suggested by @BigBadaboom that it would be useful to provide some sort of switch to authors, that could make these degenerate shapes render like their equivalent paths. SVG WG members on the telcon discussing that issue agreed that this was a nice "future wish list" feature.

@AmeliaBR
Copy link
Contributor Author

PS, any change or new property for one-dimensional shapes should also apply for embedded elements, all of which also have the same rule about zero width/height disabling rendering. There is no equivalent path consistency for these elements, but there could be filter effects.

Furthermore, as Lea Verou discovered (tweet, demo), browsers are currently inconsistent about zero width/height impact on <foreignObject>. Firefox follows the spec and disables rendering, but Chrome just treats it as a zero height/width container element, and allows absolutely positioned child elements to overflow.

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

No branches or pull requests

2 participants