Merge typography styles
Merge typography styles is a feature specifically designed for Tailwind CSS that intelligently combines font-related variables into a configuration format that adheres to Tailwind conventions.
How it works
When you define font-related variables in Figma (such as font size, line height, etc.), Variables Xporter will:
- Identify relevant variables
- Combine variables according to naming rules
- Generate Tailwind CSS configuration
Example conversion
Figma Variables:
font-size/heading-1/DEFAULTfont-size/heading-1/line-heightfont-size/heading-1/font-weight
Converted Tailwind CSS configuration or CSS variables:
Tailwind CSS V4
@theme {
--text-heading-1: 2.5rem;
--text-heading-1--line-height: 1.2;
--text-heading-1--font-weight: 600;
}Naming conventions
To ensure Variables Xporter correctly identifies and merges variables, please follow these naming rules:
- Basic naming format
font-size/{variable}/{property}
-
Supported properties
font-sizeline-heightfont-weightletter-spacing
-
Example naming
font-size/sm/DEFAULTfont-size/sm/line-heightfont-size/sm/font-weightfont-size/sm/letter-spacing
Learn more about organizing typography and font variables in Figma:
Suggestions for organizing typography and font variablesLast updated on