Created
October 20, 2018 20:49
-
-
Save JawsomeJason/1400133dddd18d76fbe86cffc5f27b09 to your computer and use it in GitHub Desktop.
Revisions
-
JawsomeJason created this gist
Oct 20, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ // see https://css-tricks.com/snippets/css/fluid-typography/ for 🤯 .viewport-fluid(@property, @from, @to, @screen-min: @screen-sm, @screen-max: @screen-lg, @viewport-unit: vw) { @{property}: @from; @media (min-width: @screen-min) { @{property}: calc( @from + unit(@to - @from) * ((~"100@{viewport-unit}" - @screen-min) / unit(@screen-max - @screen-min)) ); } @media (min-width: @screen-max) { @{property}: @to; } }