Socket
Socket
Sign inDemoInstall

tailwindcss-focus-visible-within

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    tailwindcss-focus-visible-within

Simplifies targeting parent nodes with a child that has `:focus-visible` using TailwindCSS


Version published
Weekly downloads
2
decreased by-75%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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:

npm i -D tailwindcss-focus-visible-within

Add the plugin to your tailwind.config.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.

<div class="focus-visible-within:…">

Demo

Tailwind Play

<div class="p-3 relative rounded-lg focus-visible-within:outline focus-visible-within:outline-2 focus-visible-within:outline-blue-600">
  <a href="#" class="font-semibold focus-visible:outline-none">
    Link title
    <span class="absolute inset-0"></span>
  </a>
  <p class="text-neutral-600">Link description</p>
</div>

Keywords

FAQs

Last updated on 26 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc