Skip to content

Commit

Permalink
Add focus-visible-within for group (parent) and peer (sibling) (#2
Browse files Browse the repository at this point in the history
)
  • Loading branch information
zefir-git authored Mar 26, 2024
2 parents 3d104ed + 2a2b93a commit e358b76
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const plugin = require('tailwindcss/plugin');
const plugin = require("tailwindcss/plugin");

module.exports = plugin(function ({addVariant}) {
addVariant('focus-visible-within', ['&:has(:focus-visible)'])
addVariant("focus-visible-within", ["&:has(:focus-visible)"]);
addVariant("group-focus-visible-within", ":merge(.group):has(:focus-visible) &");
addVariant("peer-focus-visible-within", ":merge(.peer):has(:focus-visible) ~ &");
});

0 comments on commit e358b76

Please sign in to comment.