Created
November 6, 2015 13:14
-
-
Save napotopia/38eef2af525c4de4f918 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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 (v3.2.5) | |
// ---- | |
@function number($number) { | |
@return $number / ($number * 0 + 1); | |
} | |
@function isInteger ($n) { | |
@return round($n) == $n; | |
} | |
@function lcd($n1, $n2) { | |
@if (isInteger($n2/$n1)) { | |
$ln2: $n2/$n1; | |
$ln1: $n1/$n1; | |
@return #{$ln1}/#{$ln2}; | |
} | |
@return #{$n1}/#{$n2}; | |
//$lcd: number($fraction); | |
//@return $lcd; | |
} | |
.foo { | |
lcd: lcd(4, 10); | |
int: isInteger(4/11); | |
} | |
This file contains 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
.foo { | |
lcd: 4/10; | |
int: false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment