Home
Categories
Dictionnary
Download
Project Details
FAQ
License

Units support


The library support the following length and position units [1] :
  • The px, pt, in, cm, and mm units
  • The % unit

Behavior for the % unit

The "%" unit specifies a length or a position relative to the viewport. The library works in the following way:
  • If the with and height attributes are present in the SVG root, they are used to specify the dimensions of the viewport
  • Else if the viewBox attribute is present, it will be used to get the width and height of the viewport

Limitations

The path element does not currently support the "%" unit.

Notes


Categories: fromsvgsupport

Copyright 2021-2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD-3-Clause License