plugin for tailwind to style sub element in even or odd element
npm install tailwind-group-even-odd``bash`
npm install tailwind-group-even-odd --save
2. Add it to your tailwind.config.js file:
`js`
// tailwind.config.js
module.exports = {
plugins: [
require('tailwind-group-even-odd')
]
}
3. Activate it to add the new variants to the plugins
* group-even
* group-odd
Make the text in the small text yellow for the even childs
`js`
// tailwind.config.js
module.exports = {
...
variants: {
extend: {
textColor: ['group-even', 'group-odd']
}
},
plugins: [
require('tailwind-group-even-odd')
]
....
}
HTML input
`html
HTML output
!simple example