DR Tailwind
Importable base tailwind.config for DR
Installation
$ yarn add -D @digitalrisks/tailwind
Usage
Global Tailwind config changes (colours being used across multiple projects, spacing, etc) will be made here. Per project changes extend this base config.
Example tailwind.config.js file
const baseConfig = require('@digitalrisks/tailwind')
const config = baseConfig
config.theme.extend = {
...baseConfig.theme.extend,
// Extra per-project extensions, eg:
fontFamily: {
heading: [
'Muli',
...baseConfig.theme.extend.fontFamily.sans,
],
...baseConfig.theme.extend.fontFamily,
},
}
config.theme = {
...baseConfig.theme,
// Extra per-project overrides
}
config.plugins = {
...baseConfig.plugins,
// Extra per-project plugins
}
module.exports = config