Tailwind Vendor Prefixes

1.1k Views Asked by At

Is there a way to use vendor prefixes in tailwind css?

.search::-webkit-search-cancel-button{
  display: none;
}
1

There are 1 best solutions below

1
Unmitigated On

To apply styles to vendor-specific pseudo-classes or pseudo-elements in Tailwind, arbitrary variants can be used.

For example, to hide the ::-webkit-search-cancel-button on a specific <input> element:

<input class="[&::-webkit-search-cancel-button]:hidden" type="search" />