Last active
April 18, 2018 19:42
-
-
Save jhesgodi/6cc3e226df140589ce218a9351b93a1a to your computer and use it in GitHub Desktop.
This file contains 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
// https://github.com/Jakobud/poly-fluid-sizing | |
// @import 'node_modules/poly-fluid-sizing/poly-fluid-sizing'; | |
@import 'poly-fluid-sizing' | |
@mixin fluid-font-size($from: 16px, $to: 16px) { | |
@include poly-fluid-sizing('font-size', ( | |
320px: $from, | |
1800px: $to, | |
)); | |
} | |
// Use fluid-font-size() for interpolate font-size | |
// between 320px and 1800px viewport width | |
body { | |
@include fluid-font-size(18px, 20px); | |
} | |
// Generated output: | |
body { | |
font-size: 18px; | |
} | |
@media (min-width: 320px) { | |
body { | |
font-size: calc(.13514vw + 17.56757px); | |
} | |
} | |
@media (min-width: 1800px) { | |
body { | |
font-size: 20px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment