Created
May 11, 2016 19:05
-
-
Save YohannParis/7cad6becdb9cfad47f9afe0ea5847b65 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
.fluid-type(@property, @min-vw, @max-vw, @min-size, @max-size) { | |
@{property}: @min-size; | |
@media screen and (min-width: @min-vw) { | |
@{property}: calc( @min-size ~" + " unit(@max-size - @min-size) ~" * ((100vw - " @min-vw ~") /" unit(@max-vw - @min-vw) ~")" ); | |
} | |
@media screen and (min-width: @max-vw) { | |
@{property}: @max-size; | |
} | |
} | |
body { | |
.fluid-type(font-size, 600px, 900px, 12px, 28px); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment