File: D:/HostingSpaces/SBogers10/ste.komma.pro/resources/sass/5-Components/_components.projector.scss
.c-projector {
height: 100%;
}
.c-projector__figure {
@include mq($max: m) {
//min-height: 66.67vw; // default photo aspect ratio (3/2)
}
position: relative;
display: grid;
grid-template-rows: 1fr;
grid-template-columns: 1fr;
height: 100%;
overflow: hidden;
border-top-left-radius: map-get($border-radius, s);
border-top-right-radius: map-get($border-radius, xl);
border-bottom-right-radius: map-get($border-radius, xs);
border-bottom-left-radius: map-get($border-radius, s);
// full size background color behind so ornaments don't shine trough on transition
&::before {
content: '';
position: absolute;
z-index: -1;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: palette(neutral, 300);
}
}
.c-projector__picture {
grid-column: 1;
grid-row: 1;
align-self: end;
height: 100%;
display: block; // Needed for IE
background-color: palette(neutral);
opacity: 0;
transition: opacity 0.5s;
&.is-active {
opacity: 1;
}
}
.c-projector__img {
// make sure it stretches the container
width: 100%;
height: 100%;
object-fit: cover; // Fallback for IE via JS polyfill
@include mq($max: m) {
max-height: 78vh; // Make sure images are visible entirely on small devices in landscape)
}
}
.c-projector__button {
position: absolute;
right: 0;
top: 50%;
display: flex;
justify-content: center;
align-items: center;
padding: 10px;
color: palette(primary, 500);
background: palette(primary, 100);
border: none;
border-radius: 100%;
cursor: pointer;
transform: translateY(-50%) translateX(50%);
transition-property: background-color, border, box-shadow;
transition-duration: 0.25s;
outline: none;
&:hover {
color: white;
background-color: palette(primary, 400);
border-color: transparent;
cursor: pointer;
}
&:active {
background-color: scale-color(palette(action), $lightness: -30%);
color: white;
}
&:focus {
@include box-shadow(low);
}
&.previous {
right: auto;
left: 0;
transform: translateY(-50%) translateX(-50%) rotate(0.5turn);
}
}
.c-projector__arrow {
display: flex;
justify-content: center;
align-items: center;
height: 16px;
font-size: 0;
line-height: 0;
}