https://github.com/cloudnode-pro/tailwindcss-focus-visible-within
Simplifies targeting parent nodes with a child that has `:focus-visible` using TailwindCSS
https://github.com/cloudnode-pro/tailwindcss-focus-visible-within
css tailwind tailwind-css tailwindcss tailwindcss-plugin
Last synced: 3 months ago
JSON representation
Simplifies targeting parent nodes with a child that has `:focus-visible` using TailwindCSS
- Host: GitHub
- URL: https://github.com/cloudnode-pro/tailwindcss-focus-visible-within
- Owner: cloudnode-pro
- License: mit
- Created: 2024-03-20T10:08:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-09T08:03:41.000Z (8 months ago)
- Last Synced: 2024-09-28T13:42:35.100Z (7 months ago)
- Topics: css, tailwind, tailwind-css, tailwindcss, tailwindcss-plugin
- Language: JavaScript
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tailwindcss-focus-visible-within
This plugin allows you to target parent nodes with a child that has `:focus-visible`.
## Usage
Install as dev-dependency using:
```sh
npm i -D tailwindcss-focus-visible-within
```
Add the plugin to your `tailwind.config.js`:```js
module.exports = {
theme: {
// …
},
plugins: [
require('tailwindcss-focus-visible-within')
// …
],
}
```
You can now apply Tailwind classes to a parent node that has an element child with the `focus-visible` state.```html
```## Demo
[**Tailwind Play**](https://play.tailwindcss.com/KvDscGgo76)
```html
```