File: D:/HostingSpaces/SBogers10/otium.komma.nl/resources/sass/6-Organisms/_organisms.videoModal.scss
/* Video Modal
-----------------------------------------*/
$o-video-modal-overlay-color: rgba(palette(primary, 600), 0.85);
/* set the iframe element to stretch to fit its parent element */
iframe#youtube-iframe {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
background: #000;
box-shadow: 0 2px 16px rgba(0,0,0,0.5);
}
.o-video-modal,
.o-video-modal__overlay {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 3000;
}
.o-video-modal {
overflow: hidden;
position: fixed;
opacity: 0;
transform: translate(500%, 0%);
transition: transform 0s linear 0s;
display: flex;
align-items: center;
transform-style: preserve-3d;
}
.o-video-modal__overlay {
z-index: 0;
background: $o-video-modal-overlay-color; /* overlay color */
opacity: 0;
transition: opacity 200ms ease-out 50ms;
}
.o-video-modal__content {
position: relative;
top: auto;
right: auto;
bottom: auto;
left: auto;
z-index: 1;
margin: 0 auto;
overflow-y: visible;
background: #000000;
width: calc(100% - 12em);
height: 0;
padding-top: calc((100% - 12em) * 0.5625); /* 16:9 calc */
/* Scaling to fit within the current Viewport size:
When viewport aspect ratio is greater than 16:9
work off the height instead of the width for calc */
@media (min-aspect-ratio: 16/9) {
width: 0;
height: calc(100vh - 10em);
padding-top: 0;
padding-left: calc((100vh - 10em) * 1.7778); /* 16:9 calc */
}
/* Mobile Layout Tweaks - side margins reduced */
@media (max-width: 640px) {
width: calc(100% - 1em);
padding-top: calc((100% - 1em) * 0.5625); /* 16:9 calc */
}
}
/* modal close button */
.o-video-modal__close {
background-color: transparent;
border: none;
display: block;
position: absolute;
left: 0;
top: -40px;
text-decoration: none;
font-size: 20px;
font-weight: bold;
color: #fff;
cursor: pointer;
}
/* show the modal:
add class to the body to reveal (via javascript) */
.is-visible-video-modal {
.o-video-modal {
opacity: 1;
transform: none;
}
.o-video-modal__overlay {
opacity: 1;
}
.o-video-modal__content {
transform: none;
}
}