Skip to content

Instantly share code, notes, and snippets.

@timhettler
Created March 25, 2015 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timhettler/cd95d4ce58689fb9cb8f to your computer and use it in GitHub Desktop.
Save timhettler/cd95d4ce58689fb9cb8f to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="test">test headline</div>
// ----
// 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);
}
.test {
font-size: 28px;
}
@media (min-width: 800px) {
.test {
font-size: 3.5vw;
}
}
@media (min-width: 1485.71429px) {
.test {
font-size: 52px;
}
}
<div class="test">test headline</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment