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

Should zero-width viewBox be valid? #13

Closed
Hixie opened this issue May 31, 2021 · 3 comments
Closed

Should zero-width viewBox be valid? #13

Hixie opened this issue May 31, 2021 · 3 comments

Comments

@Hixie
Copy link
Contributor

Hixie commented May 31, 2021

Right now the spec says that a file with minX == maxX is valid. Is that intentional?

@Hixie
Copy link
Contributor Author

Hixie commented May 31, 2021

(and obviously, same with the Y dimensions)

@nigeltao
Copy link
Collaborator

nigeltao commented Jun 1, 2021

Yes, that's intentional. I think a zero-width viewBox is a valid graphic in the same way that an empty string is a valid string. It'd be an empty graphic, because the viewBox is a clip (issue #15).

Implementations might therefore have to be concious of potential divison-by-zeroes at various places, but I think that's a reasonable requirement. That might be worth explicitly calling out in the spec...

Let me know if there's any specific implementation issues you have in mind re zero width/height viewBoxes.

@Hixie
Copy link
Contributor Author

Hixie commented Jun 1, 2021

I don't see any purpose in supporting it, but whether it's considered an error or an empty graphic seems moot, so this is fine by me.

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

No branches or pull requests

2 participants