figma.com · Free post · Product design & UX · Execution, roadmaps & process

All your questions about variables answered (and a few you didn’t even know you had)

FigmaDec 5, 20235 min
Sourcefigma.com
KindFree post
PublishedDec 5, 2023
Originalfigma.com ↗
N:

Figma's latest variables update expands customization capabilities across stroke weights, effects, opacity, and layout grids, bringing design and code closer together. Jacob Miller explains the new features, clarifies how variables complement styles (not replace them), and outlines the roadmap for typography and design token standardization. The atomic approach enables complex, multi-axis theming that single-theme solutions cannot support, while maintaining longevity and compatibility with future features.

01Key takeaways

  • Variables enable multi-axis theming that styles alone cannot support; use them for singular values that change across modes.
  • Think of styles as CSS classes and variables as CSS custom properties to understand their complementary relationship.
  • An atomic design approach to tooling ensures adaptability across complex use cases and future-proofs features.
  • Variable fonts offer infinite customization possibilities; Figma is working to make font weight specification intuitive across families.
  • Waiting for W3C design token standardization prevents fragmentation and ensures long-term interoperability across the industry.

02Key sections

New Variables Capabilities
Figma shipped reactive effects for modes, dynamic stroke weights, layer opacity control, adaptable layout grids, individual corner radius binding, and nested instance variant binding. These updates allow designers to bind variables to more design properties, enabling responsive behavior across different contexts like desktop and mobile.
Variables vs. Styles: Complementary Tools
Variables and styles work together rather than compete. Styles function like CSS classes (grouped values), while variables act like CSS custom properties (singular values that change between modes). Effect and grid styles can now embed variables, allowing them to react to modes while keeping the design process simple.
Typography and Variable Fonts
Typography is the next major focus, with variable fonts presenting unique opportunities. Figma has identified over 19k variable font axes in use, controlling properties like weight and leading. The team aims to make specifying font weights intuitive across font families while supporting this diversity.
Why Not Just Use Styles for Themes?
A style-only approach would be simpler but insufficient for complex cases. Variables enable multiple independent axes of change—for example, font size varying by device while font family varies by brand. This atomic approach ensures longevity and compatibility with future features.
Design Token Import/Export Strategy
Figma empowers plugins via the Plugin API to support hundreds of output formats. The team is also pursuing native design token interoperability aligned with W3C standardization efforts, preferring to wait for unified industry consensus rather than fragment the space with conflicting standards.
“Variables and styles work better together. Effect and grid styles can now contain variables, amplifying these styles.”Jacob Miller · figma.com
“Opting solely for style-based themes would've been simpler to execute but a lot less versatile for complex use cases.”Jacob Miller · figma.com

03Frameworks mentioned

Summary and takeaways written by PM Atlas; quotes are short excerpts. © the original author.