Creating a sharable config #2496
-
Is there any way to create a plugin to essentially inject a bunch of utilities into the "theme" and "extend" portion of the tailwind.config.js file? From what I can tell from the docs, plugins are designed to add new utilities, not override existing ones. For instance, creating a sharable color palette could be tricky because "colors" isn't a Tailwind class, so simply adding a new "colors" utility wouldn't update Or am I completely misreading the plugin-documentation? End goal: to have one GitHub repo defining a base Tailwind config style that I can use everywhere. Then, I can update different sites using this config through NPM and not need to copy-paste the config everywhere. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey! Two ways you can do this actually. First it's already possible for a plugin to register its own config extensions, check out this example: https://tailwindcss.com/docs/plugins#providing-default-options Second, there's a PR open right now for doing this in a super "first class" way using "presets": This should land in 1.9 which we'll probably release in the next week or two 👍🏻 |
Beta Was this translation helpful? Give feedback.
Hey! Two ways you can do this actually.
First it's already possible for a plugin to register its own config extensions, check out this example:
https://tailwindcss.com/docs/plugins#providing-default-options
Second, there's a PR open right now for doing this in a super "first class" way using "presets":
#2474
This should land in 1.9 which we'll probably release in the next week or two 👍🏻