Open this example in the interactive library
Source code
<button
class="demo forced-colors:forced-color-adjust-auto forced-colors:[border:2px_solid_ButtonText]"
type="button"
>
Try this button
</button>
Keep native rendering in forced colours with Tailwind CSS 4 utilities. The preview uses precompiled styles.
Open this example in the interactive library
<button
class="demo forced-colors:forced-color-adjust-auto forced-colors:[border:2px_solid_ButtonText]"
type="button"
>
Try this button
</button>