Insert padding between card image and body

This commit is contained in:
Maciej Pędzich 2023-09-03 04:28:47 +02:00
parent d5b245b33a
commit 1f5a65d977

View File

@ -16,6 +16,7 @@ const { cat } = Astro.props;
alt={cat.data.image.alt}
loading="lazy"
decoding="async"
width="350"
height="250"
/>
</div>
@ -41,10 +42,12 @@ const { cat } = Astro.props;
margin: 0.5rem 0;
padding: 0;
flex-direction: column;
transition-property: transform;
transition-duration: 300ms;
}
.card h3 {
margin-top: 0.75rem;
margin-top: 0;
margin-bottom: 0;
}
@ -54,6 +57,8 @@ const { cat } = Astro.props;
.img-wrapper {
width: 100%;
padding: 2rem;
padding-bottom: 0.75rem;
position: relative;
overflow: hidden;
}
@ -63,11 +68,9 @@ const { cat } = Astro.props;
width: 100%;
max-height: 250px;
object-fit: cover;
transition-property: transform;
transition-duration: 300ms;
}
.card:hover img {
transform: scale(1.1);
.card:hover {
transform: scale(1.05);
}
</style>