Last active
August 1, 2025 09:20
-
-
Save nicmare/8c28275b34be493dd3225f409e3a96ec to your computer and use it in GitHub Desktop.
making blocksy archive item fully clickable and animating the shadow
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
/** | |
* put it in your themes style.css and change "blog" to your post type name | |
* if your CPT is "product", you change the value "blog" to "product_archive" or "rooms_archive" | |
*/ | |
[data-prefix="blog"] .entries article.entry-card { | |
position:relative; | |
transition:box-shadow .15s ease-in-out, transform .15s ease-in-out; | |
} | |
[data-prefix="blog"] .entries article.entry-card .entry-title > a::before { | |
position:absolute; | |
left:0; | |
top:0; | |
width:100%; | |
height:100%; | |
content:""; | |
display:block; | |
z-index:10; | |
} | |
[data-prefix="blog"] .entries article.entry-card:hover { | |
--theme-box-shadow: 0px 8px 12px -5px rgba(35, 57, 102, 0.5); | |
transform:translatey(5px); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment