@episclera/weaver-tailwind-config
v1.28.0
Published
A shareable tailwind config.
Downloads
17
Readme
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
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Or you can sponsor via Open Collective
Author
@episclera/weaver © Episclera, Released under the MIT License. Authored and maintained by Episclera with help from contributors (list).