Supports Focus

Class
Properties
supports-focus
@media (focus: focus)
supports-focus-within
@media (focus-within: focus-within)
supports-focus-visible
@media (focus-visible: focus-visible)

Alternative

You can use this workaround.

Usage

Single import

// tailwind.config.js
 
import { supportsFocus } from "tailwindcss-addons"
 
export default {
    plugins: [supportsFocus],
}

Multi import

// tailwind.config.js
 
import { allAddons } from "tailwindcss-addons"
 
export default {
    plugins: [
        ...allAddons({
            supportsFocus: false, // Enabled by default.
        }),
    ],
}
Return to top