1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-06-28 00:27:58 +02:00
blog/src/components/atoms/Image.module.css

54 lines
1.1 KiB
CSS

.frame {
border: var(--stroke-width) solid rgba(255 255 255 / 20%);
border-radius: var(--border-radius);
overflow: hidden;
transition: 0.2s ease-out;
box-shadow: var(--box-shadow);
}
a:hover .frame,
a:focus .frame {
border-color: var(--link-color);
}
.image {
composes: frame;
max-width: none;
margin-top: calc(var(--spacer) * var(--line-height));
margin-bottom: calc(var(--spacer) * var(--line-height));
position: relative;
display: block;
}
/* single photo post teasers */
.image:only-child {
margin-top: 0;
margin-bottom: 0;
}
.imageTitle {
font-size: var(--font-size-h3);
font-family: var(--font-family-headings);
line-height: var(--line-height-headings);
font-weight: var(--font-weight-headings);
font-style: normal;
text-align: left;
margin: 0;
position: absolute;
top: 10%;
padding: calc(var(--spacer) / 3) var(--spacer);
background: var(--link-color);
color: #fff !important;
text-shadow: 0 1px 0 #000;
left: 0;
opacity: 0;
transform: translate3d(0, -20px, 0);
transition: 0.2s var(--easing);
}
a:hover .imageTitle,
a:focus .imageTitle {
opacity: 1;
transform: translate3d(0, 0, 0);
}