@mixin responsive-font-size($size, $mobile-reduction, $desktop-reduction: 0) { @include media-breakpoint-down(lg) { font-size: reduce-size($size, $mobile-reduction); } @include media-breakpoint-up(lg) { font-size: if($desktop-reduction == 0, $size, reduce-size($size, $desktop-reduction)); } }
How to use this mixing
// Set base font size $base-font-size:2rem; // Reduce font size from base by 75% on mobile and 50% in desktop .footer-section { @mixin responsive-font-size($base-font-size,75,50); }