Skip to content

Instantly share code, notes, and snippets.

@tyler-paulson
Created August 29, 2025 15:12
Show Gist options
  • Select an option

  • Save tyler-paulson/83ca64fda579b19d7d8c460408420430 to your computer and use it in GitHub Desktop.

Select an option

Save tyler-paulson/83ca64fda579b19d7d8c460408420430 to your computer and use it in GitHub Desktop.
Adding image-only hover states to Cargo Thumbnail Indexes using CSS
[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