@episclera/weaver-tailwind-config

A shareable tailwind config.

Usage no npm install needed!

<script type="module">
  import episcleraWeaverTailwindConfig from 'https://cdn.skypack.dev/@episclera/weaver-tailwind-config';
</script>

README

@episclera/weaver-tailwind-config

A shareable weaver tailwind config. Part of weaver monorepo

Site | Getting Started | API | Blog

GitHub Multipack

Usage

Install: npm i -D @episclera/weaver-tailwind-config

And in your tailwind.config.js file just put this content.

module.exports = require('@episclera/weaver-tailwind-config')

In the end you'll have a config which already contains all default weaver theme settings and variables.

How to customize (THEME RELATED props)

By default all THEME RELATED properties such as (colors, box, shadow, etc.) are taken and applied from @episclera/weaver-theme because weaverTheme under the hood apply them also to less vars to be 100% compatimple styles (with the same val) in less files and js files and tailwind classes. So if you want to customize the tailwind (THEME RELATED) props in a CORRECT WAY you can do it following the @episclera/weaver-theme guide

But if you need to add some tailwind plugins or to change some setting to add some new values in purge prop thne you can do it directly in your tailwind.config.js file just by using mergeConfigs util from @episclera/multipack-utils or even Object.ssign or object spread etc to extend the default config.

const { mergeConfigs } = require('@episclera/multipack-utils')
const tailwindConfig = require('@episclera/weaver-tailwind-config')

module.exports = mergeConfigs(tailwindConfig, {
  important: false, // by default is set to true in the weaver tailwind conf
  mode: 'other-mode', // by default is set to 'jit' in the weaver tailwind conf
  plugins: [
    ...(tailwindConfig.plugins || []), // spread also the default plugins (at the moment there is no default plugins but it will be in the future)
    MyPluginHere
  ]
})

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Or you can sponsor via Open Collective

Open Collective

Author

@episclera/weaver © Episclera, Released under the MIT License.
Authored and maintained by Episclera with help from contributors (list).

If you like this repository star⭐ and watch👀 on GitHub.