material-foundation / material-theme-builder

Visualize dynamic color and create a custom Material Theme.
https://material-foundation.github.io/material-theme-builder/
Apache License 2.0
362 stars 28 forks source link

Changes to text styles do not override default text styles #151

Open 3dyuval opened 1 year ago

3dyuval commented 1 year ago

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.

wilmoth77 commented 1 year ago

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?

romanr commented 1 year ago

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.

ClaudiusMa commented 5 months ago

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

JoepKockelkorn commented 2 days ago

Just found out that Roboto seems hardcoded ☹️