Created
May 21, 2025 06:18
-
-
Save frikishaan/1da8da217d7ea3dc62bf48cfd7639607 to your computer and use it in GitHub Desktop.
Make whole card clickable
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
/* Reference video - https://youtu.be/VHh8FWYWhLM?t=1280 */ | |
.card { | |
position: relative; | |
} | |
.card a::after { | |
content: ""; | |
position: absolute; | |
inset: 0; | |
} | |
.card a:is(:focus-visible)::after { | |
outline: 2px solid; | |
} | |
.card a:is(:hover, :focus) { | |
outline: none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment