Created
March 25, 2015 16:47
-
-
Save timhettler/cd95d4ce58689fb9cb8f to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
<div class="test">test headline</div> |
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
// ---- | |
// Sass (v3.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
@mixin textScaling ($minSize, $maxSize, $minWidth) { | |
$scalingFactor: $minSize/$minWidth; | |
font-size: $minSize; | |
@media (min-width: $minWidth) { | |
font-size: ($scalingFactor*100)+vw | |
} | |
@media (min-width: ($maxSize/$scalingFactor)) { | |
font-size: $maxSize; | |
} | |
} | |
.test { | |
@include textScaling (28px, 52px, 800px); | |
} |
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
.test { | |
font-size: 28px; | |
} | |
@media (min-width: 800px) { | |
.test { | |
font-size: 3.5vw; | |
} | |
} | |
@media (min-width: 1485.71429px) { | |
.test { | |
font-size: 52px; | |
} | |
} |
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
<div class="test">test headline</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment