mastoradio-fork/src/assets/scss/1-core/_00-mixins.scss

16 lines
517 B
SCSS
Raw Normal View History

2020-02-15 18:58:20 +01:00
// --------------------------------------------------------------
// == mixins */
// --------------------------------------------------------------
2021-11-07 00:11:15 +01:00
@use 'sass:math';
2020-02-15 18:58:20 +01:00
@mixin flow($font-size, $bf: $base-font, $lh: $line-height) {
$lh-value: $base-font * $lh;
2021-11-07 00:11:15 +01:00
$coeff: ceil(math.div($font-size, $lh-value));
$new-lh: math.div($lh-value, $font-size) * $coeff;
$margin-bottom: math.div($new-lh, $coeff);
2020-02-15 18:58:20 +01:00
margin-bottom: $margin-bottom + em;
2021-11-07 00:11:15 +01:00
font-size: math.div($font-size, 10) + rem;
2020-02-15 18:58:20 +01:00
line-height: $new-lh;
}