Skip to content

Commit

Permalink
chore: Add a plugin to style child elements from the parent element
Browse files Browse the repository at this point in the history
  • Loading branch information
eryc-cc committed Jul 9, 2022
1 parent 50e3401 commit d529e43
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ module.exports = {
theme: {
extend: {},
},
plugins: [],
plugins: [
function ({ addVariant }) {
addVariant('child', '& > *');
addVariant('child-hover', '& > *:hover');
addVariant('child-active', '& > *:active');
addVariant('child-focus', '& > *:focus');
}
],
}

0 comments on commit d529e43

Please sign in to comment.