stitchesjs / stitches-site

stitches.dev

Home Page:https://stitches.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

when using prefix, theme tokens in globalCSS aren't prefixed

flowen opened this issue · comments

const { styled, getCssText, keyframes } = createStitches({
  prefix: 'st-', // temp untill we remove styled-comp
  theme: {
    fonts: {
      helvetica: "'Helvetica Neue', sans-serif",
    },
  ...
}})

const globalStyles = globalCss({
  '*': {
    boxSizing: 'border-box',
    fontFamily: '$helvetica',
  },
  ...
});

export { styled, globalStyles }

app.js:

export default function App({ Component, pageProps }) {
  globalStyles()

  return (
    <React.StrictMode>
         ...
    </React.StrictMode>
  )
}

browser:
CleanShot 2023-01-22 at 14 30 40@2x
CleanShot 2023-01-22 at 14 31 00@2x

lol wrong repo