Skip to content

Commit

Permalink
rewrite svg: w/ new addVariant API tailwindlabs/tailwindcss#5809
Browse files Browse the repository at this point in the history
  • Loading branch information
david-crespo committed Nov 16, 2021
1 parent c4bfffe commit 417ee19
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tailwind.config.js
Expand Up @@ -74,13 +74,7 @@ module.exports = {
plugins: [
// imitation of the twin.macro svg: variant. svg:text-green-500 puts green
// on an SVG that's an immediate child of the element
plugin(function ({ addVariant, e }) {
addVariant('svg', ({ modifySelectors, separator }) => {
modifySelectors(
({ className }) => `.${e(`svg${separator}${className}`)} > svg`
)
})
}),
plugin(({ addVariant }) => addVariant('svg', '& > svg')),
childrenPlugin,
],
/**
Expand Down

0 comments on commit 417ee19

Please sign in to comment.