style-dictionary icon indicating copy to clipboard operation
style-dictionary copied to clipboard

Tailwind format

Open Selino opened this issue 3 years ago • 2 comments

Is there a format that's Tailwind config compatible? I'd like to have style-dictionary write an object and require that file on my tailwind.config.

This seems to work great if my colors are all at the top level of the JSON file but I use nested color groups in Figma. Writing the transform by hand is above my pay grade so I'm thinking that maybe I should " [You can request it here]". ☺️

Tailwind expects

colors: {
        poop: {
          100: "#ffffff",
          type: "color",
        },
      },

Selino avatar Jul 09 '22 16:07 Selino

@Selino Excuse me for cutting in. I have recently created a library to convert to Tailwind CSS. Please use it if you want. https://github.com/nado1001/style-dictionary-tailwindcss-transformer

nado1001 avatar Aug 30 '22 12:08 nado1001

@nado1001 Great tool. Thanks for your hard work

mwjaco avatar Jun 07 '23 20:06 mwjaco