material-theme-builder icon indicating copy to clipboard operation
material-theme-builder copied to clipboard

Changes to text styles do not override default text styles

Open 3dyuval opened this issue 2 years ago • 4 comments

Hello. What I did was:

  1. Add a new theme
  2. Waited for colors and fonts styles to be automatically generated
  3. Edited the font styles directly in Figma
  4. Export -> Web( CSS )
  5. Open generated zip file
  6. open tokens.css

I expected to see my changes to the fonts, but I see the default font styled provided in step 1.

3dyuval avatar Apr 05 '23 07:04 3dyuval

I am experiencing the same issue.

I also tried a workaround of:

  1. Export -> Theme File (JSON)
  2. Unzip and open theme.json in Visual Studio Code
  3. Manually updated Roboto style properties (fontFamilyName, fontFamilyStyle)
  4. Returned to Material Theme Builder plugin in Figma
  5. Selected Import Theme File (JSON) from the Current Theme dropdown

At this point I have the expected result. My text styles are reflecting the fonts I manually supplied in theme.json

But then:

  1. Export -> Theme File (JSON)
  2. Unzip and open theme.json in Visual Studio Code
  3. Roboto has replaced my manually updated font
  4. My manually updated font is still listed in the text styles list of my figma file

I tried clearing Figma desktop cache in terminal before exporting in to no avail.

Is Roboto hard coded somewhere in the Material Theme Builder?

wilmoth77 avatar Apr 12 '23 05:04 wilmoth77

I would rename ticket to "Text styles are not supported".
It is misleading to have typography framework declared in Material 3 site pointing to Theme Builder when Theme Builder quietly ignores your work and replaces it with Roboto anyway.

romanr avatar May 05 '23 10:05 romanr

Exactly, Theme Builder just replaced my text style with Roboto. It's weird

ClaudiusMa avatar Jan 31 '24 18:01 ClaudiusMa

Just found out that Roboto seems hardcoded ☹️

JoepKockelkorn avatar Jun 28 '24 11:06 JoepKockelkorn