everylayout/frame.css
2021-03-29 14:39:22 +13:00

30 lines
410 B
CSS

/*===========*/
/* The Frame */
/*===========*/
.frame {
--n: 9;
--d: 16;
padding-bottom: calc(var(--n) / var(--d) * 100%);
position: relative;
}
.frame > * {
overflow: hidden;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
}
.frame > img,
.frame > video {
width: 100%
height: 100%
object-fit: cover;
}