Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks when using or wrapping in an anchor element #18

Open
ivoilic opened this issue Apr 8, 2023 · 2 comments
Open

Breaks when using or wrapping in an anchor element #18

ivoilic opened this issue Apr 8, 2023 · 2 comments

Comments

@ivoilic
Copy link

ivoilic commented Apr 8, 2023

Applying a squircle fill to an <a> or wrapping another element in one results in nothing appearing

@kschiffer
Copy link

kschiffer commented Feb 12, 2024

This is a real make-or-break matter. Does anyone have any insight why this happens?

EDIT: This is a security feature. More info here: https://stackoverflow.com/questions/68094490/paintworklet-isnt-working-inside-anchor-tag

@pedroalmeida415
Copy link

My workaround is to wrap the actual squircle in a div, position it absolute to not interfere with the actual content and make it have full width and height:

<!-- 
hard set parent z-index so squircle don't end up beneath other content
 -->
<div className='z-0 relative size-20'>
<!-- 
Set the z-index to negative so it isn't on top of the actual content
 -->
  <div className='squircle absolute left-0 top-0 -z-10 h-full w-full'></div>
  <a className='h-full w-full' href='mailto:###'>
    <!-- Your link content -->
  </a>
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants