Created
September 30, 2014 16:06
-
-
Save roryashfordbentley/6d9bfafac09e336c7e28 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// 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); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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