ben-rogerson / twin.macro

🦹‍♂️ Twin blends the magic of Tailwind with the flexibility of css-in-js (emotion, styled-components, solid-styled-components, stitches and goober) at build time.
MIT License
7.89k stars 184 forks source link

Dark mode customization error #775

Closed juansalvatore closed 1 year ago

juansalvatore commented 1 year ago

When updating the tailwind.config.js to use:

  darkMode: ["class", '[data-mode="dark"]'],

instead of:

  darkMode: "class",

I get the following error:

image

This config is supported by tailwind (check https://tailwindcss.com/docs/dark-mode#customizing-the-class-name). So I was wondering if there's a way to configure twin.macro to work with this config?