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

9 lines
176 B
SCSS
Raw Normal View History

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