hypothetical/resources/sass/mixins/_aspect-ratio.scss

9 lines
185 B
SCSS
Raw Permalink Normal View History

2018-01-09 22:58:27 -05:00
@mixin aspect-ratio($width, $height) {
&:before {
content: "";
display: block;
width: 100%;
padding-top: (math.div($height, $width) * 100%);
2018-01-09 22:58:27 -05:00
}
}