2020-07-23 13:57:38 +01:00
|
|
|
const plugin = require('tailwindcss/plugin')
|
2020-05-15 01:29:21 +01:00
|
|
|
const {variants} = require('tailwindcss/defaultConfig')
|
|
|
|
const {fontFamily, spacing} = require('tailwindcss/defaultTheme')
|
|
|
|
|
2020-04-10 10:10:54 +01:00
|
|
|
module.exports = {
|
2020-05-17 10:18:33 +01:00
|
|
|
important: true,
|
2020-05-19 17:45:52 +01:00
|
|
|
purge: {
|
|
|
|
content: [
|
|
|
|
'templates/**/*.twig',
|
|
|
|
|
|
|
|
// Include any classes used within config (e.g. within views).
|
2020-05-20 01:54:06 +01:00
|
|
|
'../../../../config/**/*.yml',
|
|
|
|
|
|
|
|
// Include any classes stored within body fields.
|
|
|
|
'body-field-values.txt'
|
2020-05-19 17:45:52 +01:00
|
|
|
],
|
|
|
|
options: {
|
|
|
|
whitelist: [],
|
|
|
|
}
|
|
|
|
},
|
2020-04-10 10:10:54 +01:00
|
|
|
theme: {
|
2020-05-15 01:29:21 +01:00
|
|
|
extend: {
|
|
|
|
colors: {
|
|
|
|
inherit: 'inherit'
|
|
|
|
},
|
|
|
|
fontFamily: {
|
2020-05-23 01:40:18 +01:00
|
|
|
mono: [
|
|
|
|
'Operator Mono',
|
|
|
|
'Roboto Mono',
|
|
|
|
...fontFamily.mono
|
|
|
|
]
|
2020-05-15 01:29:21 +01:00
|
|
|
},
|
|
|
|
spacing: {
|
|
|
|
'2px': '2px'
|
|
|
|
},
|
|
|
|
borderWidth: {
|
|
|
|
3: '3px'
|
|
|
|
},
|
|
|
|
width: {
|
|
|
|
96: '24rem'
|
|
|
|
}
|
|
|
|
}
|
2020-04-10 10:10:54 +01:00
|
|
|
},
|
2020-05-15 01:29:21 +01:00
|
|
|
corePlugins: {
|
|
|
|
container: false
|
|
|
|
},
|
|
|
|
plugins: [
|
2020-07-23 13:57:38 +01:00
|
|
|
plugin(function({ addVariant, e }) {
|
|
|
|
addVariant('focus-visible', ({ modifySelectors, separator }) => {
|
|
|
|
modifySelectors(({ className }) => {
|
|
|
|
return `.${e(`focus-visible${separator}${className}`)}[data-focus-visible-added]`
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
2020-05-15 01:29:21 +01:00
|
|
|
],
|
|
|
|
variants: {
|
2020-07-23 13:57:38 +01:00
|
|
|
borderColor: [...variants.borderColor, 'focus-visible'],
|
2020-05-15 01:29:21 +01:00
|
|
|
borderStyle: [...variants.borderStyle, 'hover', 'focus'],
|
2020-05-26 23:16:47 +01:00
|
|
|
borderWidth: [...variants.borderWidth, 'hover', 'focus'],
|
|
|
|
margin: [...variants.margin, 'first', 'last', 'odd', 'even'],
|
2020-05-15 01:29:21 +01:00
|
|
|
}
|
2020-04-10 10:10:54 +01:00
|
|
|
}
|