Can we define min-margin
and max-margin
, max-padding
and min-padding
in CSS ?
This seems to work for me to make a responsive iframe embed with a max height set.
.embed-container {
position: relative;
padding-bottom: min(80vh, 100%);
width: 100%;
height: 100%;
max-height: 80vh;
overflow: hidden;
max-width: 100%;
}
.embed-container iframe,
.embed-container object,
.embed-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
max-height: 80vh;
}