system-ui / theme-ui

Build consistent, themeable React apps based on constraint-based design principles

Home Page:https://theme-ui.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After updating the fonts are not properly resolved

kevinfoerster opened this issue · comments

Describe the bug
It look like generally theme ui is working i updated from 0.14.7 to 0.16.1 but fonts are not correclty rendered, checking the resulting css, it looks like the names instead of its values are applied.

my theme defines fonts like this:

{
...
fonts : {
  body: 'Merriweather Sans',
  heading: 'Merriweather Sans',
},
text: {
  dateline: {
    fontFamily: 'body',
    textTransform: 'uppercase',
    fontWeight: 'light',
    color: 'dateline',
    pb: 2,
    display: 'block',
},
...
}

Expected behavior
font-family should not show heading but Merriweather Sans instead!

Screenshots

CleanShot 2023-11-19 at 00 31 01@2x

Additional context
this project uses the latest gatsby version and the follwing relevant dependencies:

    "theme-ui":"0.16.1",
    "gatsby-plugin-theme-ui":"0.16.1",
    "@emotion/react": "^11.11.1",
    "@fontsource/merriweather-sans": "5.0.8",
    "@mdx-js/react ": "1.6.22",
    "@theme-ui/mdx":"0.16.1",

This seems like there's a version mismatch on either Theme UI or Emotion's React Context.
Could you post your lockfile?