#how integrate unocss with astro?

2 messages · Page 1 of 1 (latest)

clever bough
#

i've tried looking up both the unocss docs and astro docs in regards to installing integrations.

i'm working on a site with tailwindcss. i want to use unocss instead, but i've been having a hard time trying to adapt unocss to astro's new font api. is there something i'm doing wrong here?

export default defineConfig({
  // ...
  integrations: [
    // ...
    unocss({
      injectReset: true,
      presets: [
        presetWind4(),
        presetTypography(),
        presetDaisy(),
      ],
      transformers: [
        transformerDirectives(),
      ],
      theme: {
        font: {
          sans: ["var(--quattro)"],
          serif: ["var(--plex-serif)"],
          mono: ["var(--intel-mono)"],
          dyslexic: ["var(--dyslexic)"],
          display: ["var(--jacquard-12)"],
        },
      },
    }),
  ],
  //...
  experimental: {
    fonts: [
      // fonts here
    ],
  },
});
oak pollen