Skip to main content
Henrik_Hedegaard
April 17, 2024
Solved

Typography variables - weight is not displayed as variable in inspect mode

  • April 17, 2024
  • 30 replies
  • 1820 views

I’ve just applied variables to all our project’s text styles.
It all works as expected.

However, in inspect mode, font weight it still displayed as normal css value and not with css-variable.

See screenshots.

Is this a bug or me messing up things?



Best answer by djv

Hey All, sorry for the trouble!

I reached out to our engineering team for further insight, and they confirmed that this is expected behavior when using String variables for font weight and size.

We will display Number variable bindings in Dev Mode for these values, but not String variables, as often many of the string representations don’t have CSS equivalent values in code.

30 replies

djv
Figmate
Community Support
May 8, 2024

Hey @David_Simpson & @Henrik_Hedegaard, thanks for letting us know!

Our team confirmed that a fix has been pushed. Please let us know if you run into any further issues.

May 20, 2024

Hi,

I can see it is fixed to Number variable not string variable for font weight, but unfortunately the font that I am using have the weight as Medium, Regular etc rather than number value, and the variable name or code syntax is not shown.

Is this the same bug or string value is not support for font weight variable right now

May 21, 2024

Okay, noticed that font weight is recognising number as well (interchangeable in variables), but wonder if string is not support for font weight then? (can read as variable but not showing the proper name in dev mode)

djv
Figmate
Community Support
May 21, 2024

Thanks for following up, @becky_u!

That definitely sounds odd. Please reach out to the support team directly via this form for help: https://help.figma.com/hc/en-us/requests/new

Please use your Figma account email, include a link to the file, and share it with support-share@figma.com, so they can take a closer look.

Melissa20
New Member
May 22, 2024

I’m having the same issue as the original poster for both font-weight and font-size.

David_McEnroe
New Participant
July 25, 2024

Same issue, weight variable not displaying in dev mode

Zhibang_Jiang1
New Member
September 27, 2024

Same issue here. I’m using the Named Alias for font weights, and they cannot be correctly displayed in the dev mode. The dev mode displays the Numeric Values that inherit from the typeface.

Thom_van_der_Doef
New Member
October 2, 2024

Looks like this issue still exists. dev mode just shows the numeric values instead of the string variable for font-weights.

Elie_Georgesson
December 2, 2024

Hello @dvaliao unfortunately the issue still exists and not yet solved.

Sahand
December 12, 2024

Same issue here? Any update @dvaliao 🥲