oliverdavies.uk/assets/tailwindcss/plugins/focus-visible.cjs

10 lines
312 B
JavaScript
Raw Normal View History

2021-06-30 07:00:00 +00:00
const plugin = require('tailwindcss/plugin')
module.exports = plugin(function({ addVariant, e }) {
addVariant('focus-visible', ({ modifySelectors, separator }) => {
modifySelectors(({ className }) => {
return `.${e(`focus-visible${separator}${className}`)}[data-focus-visible-added]`
})
})
})