Places all Figma letter spacings into a clean object
Figma allows to provide (in the Figma document itself) letterSpacing in either "%" or "px".
The API internally converts the provided value in a number, which is the calculated value based on the font-size (no unit is provided, but the value corresponds to px)
Ex: if the font-size is 32px and the letterSpacing 4%, the exported value from the API will be 32 * 4 / 100 = 1.28.
In CSS however, the letter-spacing length allows either "px" or "em" units (or even "rem" even though it hardly make any sense for letter-spacing in practice):
Places all Figma letter spacings into a clean object
Figma allows to provide (in the Figma document itself) letterSpacing in either "%" or "px". The API internally converts the provided value in a number, which is the calculated value based on the font-size (no unit is provided, but the value corresponds to px) Ex: if the font-size is 32px and the letterSpacing 4%, the exported value from the API will be 32 * 4 / 100 = 1.28. In CSS however, the letter-spacing length allows either "px" or "em" units (or even "rem" even though it hardly make any sense for letter-spacing in practice):
https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing