Created
August 29, 2025 15:12
-
-
Save tyler-paulson/83ca64fda579b19d7d8c460408420430 to your computer and use it in GitHub Desktop.
Adding image-only hover states to Cargo Thumbnail Indexes using CSS
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
| [id="I3960493925"] media-item.thumbnail.linked::part(sizing-frame) { | |
| position: relative; | |
| overflow: hidden; | |
| background-size: cover; | |
| background-repeat: no-repeat; | |
| border-radius: 1.5rem; | |
| } | |
| [id="I3960493925"] media-item.thumbnail.linked::part(media) { | |
| transition: opacity linear 400ms; | |
| opacity: 1; | |
| } | |
| [id="I3960493925"] media-item.thumbnail.linked:hover::part(media) { | |
| opacity: 0; | |
| } | |
| [id="I3960493925"] media-item.thumbnail.linked[href="#project-1"]::part(sizing-frame) { | |
| background-image: url('https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExNTFuZnVxaHQybHplYWs4NW8xam1pMDdoeWV1N3kyaTlwaXZha2dnYSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/GuTqAQ2R6NlZK/giphy.gif'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment