seek-oss / capsize

Flipping how we define typography in CSS.

Home Page:https://seek-oss.github.io/capsize/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docs: Small Correction for Responsive Typography Section

phil-lgr opened this issue · comments

In https://github.com/seek-oss/capsize/blob/master/packages/vanilla-extract/README.md#responsive-typography

const vars = createTheme({
  bodyText: {
    mobile: precomputeValues({ fontSize: 18, leading: 24, fontMetrics }),
    tablet: precomputeValues({ fontSize: 16, leading: 22, fontMetrics }),
    desktop: precomputeValues({ fontSize: 14, leading: 18, fontMetrics }),
  },
});

Should be:

const [className, vars] = createTheme({
  bodyText: {
    mobile: precomputeValues({ fontSize: 18, leading: 24, fontMetrics }),
    tablet: precomputeValues({ fontSize: 16, leading: 22, fontMetrics }),
    desktop: precomputeValues({ fontSize: 14, leading: 18, fontMetrics }),
  },
});