Created
March 7, 2019 12:46
-
-
Save fuale/8259849a50a72b02c75c1907b31bb3e3 to your computer and use it in GitHub Desktop.
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 characters
/** | |
- Create responsive font-size; | |
min = minimal font size | |
max = maximal font size | |
min_view = minimal view width | |
max_view = maximal view width | |
*/ | |
responsive-font(min, max, min_view, max_view) | |
font-size: "calc(%spx + (%s - %s) * ((100vw - %spx) / (%s - %s)))" % (min max min min_view max_view min_view) | |
// example | |
.some_element | |
responsive-font(16, 22, 320, 768) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment