Skip to content

Instantly share code, notes, and snippets.

View Elvenmagic's full-sized avatar
👺
I may be slow to respond.

Thor Elvenmagic

👺
I may be slow to respond.
  • Helix Group
  • Tbilisi
View GitHub Profile
@Elvenmagic
Elvenmagic / rf.scss
Created November 29, 2017 15:35
Responsive vh/vw based font sizes
@mixin responsive-font($responsive, $min, $max: false, $fallback: false) {
$responsive-unitless: $responsive / ($responsive - $responsive + 1);
$dimension: if(unit($responsive) == 'vh', 'height', 'width');
$min-breakpoint: $min / $responsive-unitless * 100;
@media (max-#{$dimension}: #{$min-breakpoint}) {
font-size: $min;
}
@if $max {