feat: animate caption

This commit is contained in:
Damillora 2021-07-11 03:35:31 +07:00
parent 77c6d76d46
commit 478d47217b

View File

@ -18,6 +18,28 @@
.kg-image { .kg-image {
width: 100%; width: 100%;
} }
figcaption {
font-size: $text-sm;
background: var(--bg-color);
color: var(--highlight-color);
padding: 0.25rem 1rem;
border-radius: 1rem;
margin-left: 0.5rem;
margin-right: 0.5rem;
text-align: center;
position: absolute;
bottom: 2rem;
box-shadow: 0px 0px 4px 1px var(--accent-color);
@include transition;
@include screen(md) {
padding: 0.5rem 2rem;
}
}
&:hover figcaption {
transform: translateY(150%);
}
} }
.kg-width-wide .kg-image { .kg-width-wide .kg-image {
min-width: 100vw; min-width: 100vw;
@ -35,27 +57,6 @@
.kg-width-full .kg-image { .kg-width-full .kg-image {
min-width: 100vw; min-width: 100vw;
} }
.kg-card figcaption {
font-size: $text-sm;
background: var(--bg-color);
color: var(--highlight-color);
padding: 0.25rem 1rem;
border-radius: 1rem;
margin-left: 0.5rem;
margin-right: 0.5rem;
text-align: center;
@include screen(md) {
padding: 0.5rem 2rem;
}
}
.kg-image-card figcaption {
position: absolute;
bottom: 2rem;
box-shadow: 0px 0px 4px 1px var(--accent-color);
}
.kg-gallery-container { .kg-gallery-container {
min-width: 100vw; min-width: 100vw;
@include screen(md) { @include screen(md) {