theme-ui icon indicating copy to clipboard operation
theme-ui copied to clipboard

After updating the fonts are not properly resolved

Open kevinfoerster opened this issue 7 months ago • 1 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",

kevinfoerster avatar Nov 18 '23 23:11 kevinfoerster

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

hasparus avatar Nov 28 '23 13:11 hasparus