Open this example in the interactive library
Source code
<div
class="demo size-24 [clip-path:polygon(50%_0,100%_50%,50%_100%,0_50%)]"
aria-hidden="true"
></div>
Clip a swatch to a diamond with Tailwind CSS 4 utilities. The preview uses precompiled styles.
Open this example in the interactive library
<div
class="demo size-24 [clip-path:polygon(50%_0,100%_50%,50%_100%,0_50%)]"
aria-hidden="true"
></div>