chayns-components
Version:
A set of beautiful React components for developing chayns® applications.
81 lines • 1.53 kB
CSS
.cc__image {
position: relative;
height: 100%;
display: flex;
flex: 1;
-ms-flex: 1;
justify-content: center;
overflow: hidden;
}
.cc__image--landscape {
flex-direction: row;
/* IE10+ CSS */
}
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
.cc__image--landscape {
padding-right: 100%;
}
}
.cc__image--portrait {
flex-direction: column;
/* IE10+ CSS */
}
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
.cc__image--portrait {
padding-bottom: 100%;
}
}
.cc__image--clickable {
cursor: pointer;
}
.cc__image--more-images:after {
content: attr(data-more);
color: #fff;
position: absolute;
background-color: rgba(0, 0, 0, 0.75);
top: 0;
right: 0;
bottom: 0;
left: 0;
text-align: center;
font-size: 42px;
display: flex;
justify-content: center;
align-items: center;
pointer-events: none;
}
.cc__image__img, .cc__image__preview {
min-height: 100%;
min-width: 100%;
width: auto;
height: auto;
object-fit: cover;
}
.cc__image__img {
position: absolute;
opacity: 0;
transition: opacity 0.3s;
}
.cc__image--ready .cc__image__img {
position: initial;
opacity: 1;
}
.cc__image__preview {
filter: blur(10px);
position: initial;
opacity: 1;
transition: opacity 0.3s;
}
.cc__image--ready .cc__image__preview {
position: absolute;
opacity: 0;
}
.cc__image__wait-cursor {
width: 100%;
height: 100%;
position: absolute;
display: flex;
justify-content: center;
align-items: center;
top: 0;
}