Options
All
  • Public
  • Public/Protected
  • All
Menu

Module entities/Token/logic/makeLetterSpacingTokens

Index

Functions

makeLetterSpacingTokens

  • description

    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):

    see

    https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing

    Parameters

    • letterSpacingFrame: FRAME
    • letterSpacingUnit: string

    Returns LetterSpacingTokens

Generated using TypeDoc