Tokens Studio for Figma
  • Getting Started
    • Tokens Studio Plugin for Figma
    • Install the Figma Plugin
    • Pro Licence for the Figma Plugin
    • Join the Slack Community
    • Feature Requests - Featurebase
    • Changelog - Featurebase
  • Design Token Fundamentals
    • Intro to Design Tokens
      • Token Anatomy - Type
      • Token Anatomy - Value
      • Token Anatomy - Description
      • Token Anatomy - Name
  • Token Management
    • Token Types
      • Asset
      • Boolean
      • Border - Composite
      • Box Shadow - Composite
      • Color
        • Modified Colors (pro)
        • Gradient Colors
      • Dimension
        • Border Radius
        • Border Width
        • Sizing
        • Spacing
      • Number
      • Opacity
      • Other
      • Text (string)
      • Typography - Composite
        • Font Family
        • Font Weight
        • Font Fallbacks
        • Font Size
        • Line Height
        • Letter Spacing
        • Paragraph Indent
        • Paragraph Spacing
        • Text Case
        • Text Decoration
      • Composition (legacy)
    • Token Values
      • Token Values with References
      • Using Math in Token Values
    • Token Names
      • Token Name Technical Specs
      • Token Groups
      • Edit Token Names
    • Token Description
    • Token Sets
      • JSON View
  • Themes management
    • Themes (pro)
    • Themes that switch
  • Working in Figma
    • Variables and Tokens Studio
    • Styles and Tokens Studio
    • Export to Figma Guide
      • Export Options
      • Export Using Themes (pro)
      • Export Using Token Sets
      • Variables Skipped on Export
      • Styles with Variable References
    • Import from Figma Guide
      • Import Styles from Figma
      • Import Variables from Figma
        • Connect Themes to Imported Variables
        • Imported Variable Types and Token Types
    • Non-local Variables and Styles (pro)
    • Remove Tokens from Figma elements
    • Dev Mode in Figma
  • Settings Management
    • Plugin Settings
    • Base Font Size Setting
    • Token Format - W3C DTCG vs Legacy
  • Token Storage and Sync Integrations
    • Local Document - Figma File Token Storage
      • Figma Data Limits
    • Remote Token Storage Integrations
      • GitHub - Git Sync Provider
      • GitLab - Git Sync Provider
      • Bitbucket - Git Sync Provider
      • Azure DevOps - Git Sync Provider
      • JSONBin - Cloud Sync Provider
      • Supernova - Cloud Sync Provider
      • Tokens Studio Platform - Cloud Sync Provider
      • URL - Server Sync Provider
      • Generic Versioned Storage - Server Sync Provider
    • Multi-file Sync to Remote Storage (pro)
    • Manage Sync Providers
      • Edit Sync Provider
      • Change Active Sync Provider
      • Remove Sync Provider
    • Sync Changes to Remote Storage - Push and Pull
    • Branch Switching (pro) - Version Control
  • Inspect and Debug Tokens
    • Inspect Tokens
    • Remap Tokens
  • Transform Tokens for Development
    • Style Dictionary + SD Transforms
    • Official docs for Style Dictionary
  • Style Dictionary Playground
  • Troubleshooting
    • Reset Tokens from Dev Console
    • Tokens Studio Status
  • Open Source
    • Contribute
    • Shared Plugin Data
Powered by GitBook
On this page
  • Paragraph Spacing - Token Type
  • Design decisions
  • Possible values
  • Hard-coded values
  • Values that reference another Token
  • W3C DTCG Token Format
  • Transforming Tokens
  • Resources

Was this helpful?

Edit on GitHub
Export as PDF
PreviousParagraph IndentNextText Case

Last updated 4 months ago

Was this helpful?

Paragraph Spacing - Token Type

Paragraph Spacing Tokens define the vertical distance between 2 paragraphs of text as an individual property to be composed within a . It is not intended to be applied to text elements directly.


Design decisions

Tokens Studio added support for Paragraph Spacing to accommodate Figma's unique way of handling text styles. They use this property to define the vertical distance between 2 paragraphs of text.

This property does not appear in Figma's Dev Mode

While you can apply the Token using the plugin to change Figma's Paragraph Spacing property, this value does not have a CSS equivalent property so it does not show up in Dev Mode when inspecting CSS.

The Token applied will show up when inspecting Tokens Studio in Dev Mode.

→ Read the Dev Mode guide here.

When we apply a Typography Composite Token to a text layer in Figma, these Paragraph Spacing values will change the text layer:

  • Preferred value - 0

    • No additional space between paragraphs.

    • A line break would be added to create the space needed instead.

    • This most closely matches how spacing between paragraphs would be done in code.

  • Relative to Font Size - value in rem units

    • Example: Paragraph Spacing at 0.5rem with Font Size at 1rem

    • A person who has increased the font size of a mobile phone will see the space between paragraphs half the size of the text.

  • Fixed - value in pixels

    • Example 8px

    • The space between paragraphs will remain the same as a user zooms into a webpage.

Paragraph Spacing Tokens can be attached to Number Variables in Figma.


Possible values

Like all Tokens defining a dimension design decision, the value of a Paragraph Spacing Token must include a numeric value and, ideally, a unit of measure.

Tokens without a unit specified are applied as the pixel equivalent in Figma.

Hard-coded values

When writing the hard-coded values for a Paragraph Spacing Token, you'll want to:

  • Avoid spaces

  • Include a number and unit of measure.

    • Values without a unit will be translated to pixels in Figma.

    • The value should always be greater than 0.

  • Or use the specified string (below) for the normal value.

rem units (rem)

To support responsive design, you can define your Paragraph Spacing Token in rem units, and the plugin automatically converts the value to the pixel equivalent when the Typography Composite Token is applied to the text element in Figma.

For example, a Paragraph Spacing Token with a value of 1rem, when applied as a Typography Composite Token, will appear as 16px in Figma.

Pixel units (px)

While its not common, should you require the space between every paragraph to remain static even when users change their preferences, the Paragraph Spacing value can be defined in pixel units. For example:

16px

Values that reference another Token

When trying to reference another Token as the Value for a Paragraph Spacing Token, you will see Tokens in the dropdown list that are:

  • Living in Token Sets that are currently active.

    • In the left menu on the plugin's Tokens page, a checkmark is visible next to the Token Set name.

  • Token Type is compatible:

    • The same = paragraphSpacing

    • dimension

    • number


W3C DTCG Token Format

Paragraph Spacing is not an official token type in the W3C Design Token Community Group specifications.

Tokens Studio has added Paragraph Spacing as an unofficial Token Type to support Figma's unique approach to this text property.


Transforming Tokens

When transforming Paragraph Spacing Tokens, there are specific configurations to be aware of.

The preprocessor in the SD-Transforms package will automatically convert the Tokens Studio specific Token Type of paragraphSpacing to align with the DTCG Format Token Type of dimension.

Paragraph Spacing, as part of Typography Composite Tokens, requires the SD-Transforms option to expand composite Tokens into multiple Tokens.


Resources

Mentioned in this doc:

Figma resources:

CSS resources:

Community resources:

  • None yet!

Known issues and bugs

  • None yet

Requests, roadmap and changelog

  • None

This isn't a typical CSS property; you could define it by adding a .

→

SD-Transforms -

Style Dictionary -

Design Tokens Community Group -

Design Tokens Community Group -

Design in Figma - Explore Text Properties,

MDN Web Docs -

Tokens Studio Plugin GitHub -

margin to your paragraphs
SD-Transforms Read-Me Doc, Using the preprocessor
Read Me
https://styledictionary.com/
W3C Draft
9.7 Typography
Paragraph Spacing
The paragraph element
Open issues for Token Type Paragraph Spacing
Typography Token
Creating a new Paragraph Spacing Token in the Tokens Studio Plugin for Figma.
The Typography Composite Token form is open, with each property referencing another Token. The Paragraph Spacing property is highlighted.
Page cover image

Jump to the guide on Exporting Tokens to Figma by selecting the card below to learn more.

Export to Figma Guide

Rem Units act as a multiplier of the base font size, so when a user changes their preferences to a larger font size or uses a zoom feature in your product, elements defined in rem units will respond accordingly.

The value of 1rem can be configured in the .

plugin settings for Base Font Size

Engineers typically transform Tokens used in code with , which is tool-agnostic. Tokens coming from Tokens Studio require an additional step: , an npm package that prepares Tokens for Style Dictionary.

Style Dictionary
@Tokens-studio/sd-transforms

However, like all Token Types, you can "force" a reference by manually entering the Token Name between curly brackets.

For example {token.name.here}

The value will show a broken reference until the originating Token Set is marked as enabled.

Jump to the guide on Token Values with References by selecting the card below to learn more.

💡 Something to share?

Make sure you look at the generic SD-Transforms package to include this option, which allows you to further customize this transformation further using Style Dictionary.

→

"object, object" When you transform your Typography Tokens and they show "object, object", it means your SD-Transforms configuration needs to be adjusted to include "expand".

Token Values with References
Submit it here!
SD-Transforms Read-Me Doc, Using Expand

🐞 If you are experiencing an issue not listed here, please reach out to us on the Troubleshooting channel of our , , or send us an email support@tokens.studio

community Slack
submit it on our feedback tool

💌 Visit to contribute or subscribe to updates.

https://feedback.tokens.studio/