Skip to content

Instantly share code, notes, and snippets.

@abdobouna
Last active January 2, 2016 16:55
Show Gist options
  • Save abdobouna/6e157e085bc51d8d7360 to your computer and use it in GitHub Desktop.
Save abdobouna/6e157e085bc51d8d7360 to your computer and use it in GitHub Desktop.
A function for scaling font sizes.
// A function for scaling font sizes.
@function scale-font-sizes($font-sizes, $scale: 1) {
// A list for holding scaled font sizes.
$ret: ();
// Populate the list by mulitplying each font size by a $scale
// and append it to the end of the list.
@each $font-size in $font-sizes {
$ret: append($ret, $font-size * $scale);
}
// return our list of scaled font sizes.
@return $ret;
}
@abdobouna
Copy link
Author

Usage:

  $hf: 10px, 20px, 30px, 40px, 50px, 60px;
  $shf: scale-font-sizes($hf, .9);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment