Created
May 21, 2025 12:38
-
-
Save joeldrapper/42dae944bf0cb77ff6ec28559275aec0 to your computer and use it in GitHub Desktop.
Tailwind squircle mask
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@utility mask-squircle-1 { | |
mask: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3e%3cpath d='M 0,0.5 C 0,0 0,0 0.5,0 1,0 1,0 1,0.5 1,1 1,1 0.5,1 0,1 0,1 0,0.5'/%3e%3c/svg%3e"); | |
} | |
@utility mask-squircle-2 { | |
mask: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3e%3cpath d='M 0,0.5 C 0,0.0575 0.0575,0 0.5,0 0.9425,0 1,0.0575 1,0.5 1,0.9425 0.9425,1 0.5,1 0.0575,1 0,0.9425 0,0.5'/%3e%3c/svg%3e"); | |
} | |
@utility mask-squircle-3 { | |
mask: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3e%3cpath d='M 0,0.5 C 0,0.115 0.115,0 0.5,0 0.885,0 1,0.115 1,0.5 1,0.885 0.885,1 0.5,1 0.115,1 0,0.885 0,0.5'/%3e%3c/svg%3e"); | |
} | |
@utility mask-squircle-4 { | |
mask: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3e%3cpath d='M 0,0.5 C 0,0.1725 0.1725,0 0.5,0 0.8275,0 1,0.1725 1,0.5 1,0.8275 0.8275,1 0.5,1 0.1725,1 0,0.8275 0,0.5'/%3e%3c/svg%3e"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment