PostCSS Focus Within
Last updated
Was this helpful?
Last updated
Was this helpful?
lets you use the :focus-within
pseudo-class in CSS, following the .
It is the companion to the .
duplicates rules using the :focus-within
pseudo-class with a [focus-within]
attribute selector, the same selector used by the . This replacement selector can be changed using the replaceWith
option. Also, the preservation of the original :focus-within
rule can be disabled using the preserve
option.
The preserve
option defines whether the original selector should remain. By default, the original selector is preserved.
The replaceWith
option defines the selector to replace :focus-within
. By default, the replacement selector is [focus-within]
.
Add to your project:
Use to process your CSS:
Or use it as a plugin:
runs in all Node environments, with special instructions for: