Skip to content

Instantly share code, notes, and snippets.

@scottkellum
Created March 21, 2014 14:51
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 scottkellum/9687947 to your computer and use it in GitHub Desktop.
Save scottkellum/9687947 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.3)
// Compass (v1.0.0.alpha.18)
// ----
@function inverse($number) {
$unit: 0 * $number + 1;
@if unit($unit) == "%" {
@return percentage(100 / ($number / $unit));
}
@return 1 / ($number / $unit) * $unit;
}
i {
i: inverse(50%);
i: inverse(1.6em);
i: inverse(3);
}
i {
i: 200%;
i: 0.625em;
i: 0.33333;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment