tailwind-css-variables icon indicating copy to clipboard operation
tailwind-css-variables copied to clipboard

feat: export css variables to a separate file

Open jshrssll opened this issue 5 years ago • 1 comments

This feature enables users to export the CSS variables into an separate file so that they are not bundled with the compiled tailwind.css file. This enables portability and easy theming across multiple sites & design systems that are derived from a single tailwind.css file.

This is a personal use case I'm facing and rather hacking the installed node_module files, I would love to see this feature supported in the distributed package.

There are two new options that are checked outputToFile and outputFilePath. Descriptions of their use can be found in the README.

jshrssll avatar Aug 04 '20 06:08 jshrssll

Hi @splurtcake,

thanks for your pull request I don't think it's a good idea to use fs here since PostCSS handle eveything.

I'm thinking about a better idea, what about something like @tailwind root directive same as @tailwind base or tailwind utilities?

it's would be a clean approach for this plugin and less code for us, but I still need to ask Tailwind maintainer about this approach before implementing it.

omarkhatibco avatar Aug 04 '20 12:08 omarkhatibco