Example
Ratio
Ratio calculates the ratio based on the width of the element. This way you can get basic ratio settings like 16/9. Pseudo will be false as default, setting it to true adds the ratio as a before pseudo to the element.
HTML:
<span class="mixin-example-ratio">_</span>
SCSS:
.mixin-example-ratio {
@include ratio(16, 2);
}
Classes
Mixin | Parameters | Values |
ratio | x, y, pseudo | (number), (number), boolean |