Skip to content

Instantly share code, notes, and snippets.

@roryashfordbentley
Created September 30, 2014 16:06
Show Gist options
  • Save roryashfordbentley/6d9bfafac09e336c7e28 to your computer and use it in GitHub Desktop.
Save roryashfordbentley/6d9bfafac09e336c7e28 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v2.0.0)
// ----
@mixin equivalent_fractions($numerator,$denominator){
@for $i from -$numerator through -1{
@if($numerator % abs($i) == 0 and $denominator % abs($i) == 0){
numerator: $numerator;
increment: abs($i);
out: #{$numerator % abs($i)}-#{$denominator % abs($i)};
}
}
}
.test{
@include equivalent_fractions(12,24);
}
.test {
numerator: 12;
increment: 12;
out: 0-0;
numerator: 12;
increment: 6;
out: 0-0;
numerator: 12;
increment: 4;
out: 0-0;
numerator: 12;
increment: 3;
out: 0-0;
numerator: 12;
increment: 2;
out: 0-0;
numerator: 12;
increment: 1;
out: 0-0; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment