Introduction
'modal-open:' Variant
You can configure a tailwindcss variant to easily style your anchor based on the openning status of your modal.
When given an anchor or creating inside an HTMLElement and taking it as its anchor, the modal will update anchor property data-modal switching from close to open.
So you can just add this @custom-variant in your stylesheet.