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

<symbol> width/height #44

Closed
5 tasks done
edemaine opened this issue Jul 31, 2019 · 0 comments
Closed
5 tasks done

<symbol> width/height #44

edemaine opened this issue Jul 31, 2019 · 0 comments

Comments

@edemaine
Copy link
Owner

edemaine commented Jul 31, 2019

<symbol viewBox="0 0 10 10" width="20" height="20"> should create a symbol that renders as final size 20x20, but currently width/height are ignored by SVG Tiler and it gets rendered as 10x10.

The behavior we want is:

  • Absent width/height inherits width/height from viewBox. (In SVG, it would actually default to auto which means 100%, but this default seems useless, and also very different from current SVG Tiler behavior.)
  • width/height explicitly set to auto makes for the auto-resizing behavior.
  • (All bullets above are technically deviations from SVG spec.)
  • Numeric width/height get treated as in SVG, with units translated to px for SVG coordinates.
  • Absent viewBox becomes 0 0 <width> <height> if width and height are present (no automatic bounding box computation).
  • Actually, if we properly set width/height on all <symbol> tags, we can omit width/height in use statements (except in auto mode), which would save a lot of characters (more re-use!).
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

1 participant