Skip to content

Instantly share code, notes, and snippets.

@colinwren
Created December 3, 2015 22:17
Show Gist options
  • Select an option

  • Save colinwren/661fd8a0c5d05438b0fe to your computer and use it in GitHub Desktop.

Select an option

Save colinwren/661fd8a0c5d05438b0fe to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
$line-heights: 1, 1.1, 1.2, 1.3, 1.4, 1.6, 1.8, 2.0;
@function str-replace($string, $search, $replace: '') {
$index: str-index($string, $search);
@if $index {
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
}
@return $string;
}
@each $line-height in $line-heights {
.u-lineHeight#{str-replace(inspect($line-height),".", "_")} {
line-height: $line-height * 1em;
}
}
.u-lineHeight1 {
line-height: 1em;
}
.u-lineHeight1_1 {
line-height: 1.1em;
}
.u-lineHeight1_2 {
line-height: 1.2em;
}
.u-lineHeight1_3 {
line-height: 1.3em;
}
.u-lineHeight1_4 {
line-height: 1.4em;
}
.u-lineHeight1_6 {
line-height: 1.6em;
}
.u-lineHeight1_8 {
line-height: 1.8em;
}
.u-lineHeight2 {
line-height: 2em;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment