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
Adding a 'streched-link' option (make parent block clickable) #1041
Comments
|
I suggest making the parent block a an anchor or a button for accessibility purposes, then adding Tailwind's |
|
I'd probably do what @AlexVipond suggested but if for some reason the link can't wrap the whole component, you can use .stretched-link::after {
content: "";
@apply z-10 absolute inset-0 bg-transparent pointer-events-auto;
} |
|
Hey @paulhuisman! I would solve this the way @AlexVipond mentioned 👍 I think adding a class like this to core would be a bit too much of a departure from the sorts of classes we currently provide, so if you wanted to create a |
|
One more solution now with JIT mode, just add <div class="realtive">
<a class="after:absolute after:inset-0" href="/link">
Link
</a>
</div> |
That solves it! |
First off, loving the framework so far, great work!
I was wondering if there's an option to add a class similar to
stretched-linkin Bootstrap 4.https://getbootstrap.com/docs/4.3/utilities/stretched-link/
What it does is make the entire parent block clickable if you add the class to a link inside.
The text was updated successfully, but these errors were encountered: