sassy-math 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/sassy-math.gemspec +1 -1
- data/stylesheets/_math.scss +33 -0
- metadata +2 -2
data/sassy-math.gemspec
CHANGED
data/stylesheets/_math.scss
CHANGED
@@ -254,3 +254,36 @@ $ϕ: $golden;
|
|
254
254
|
}
|
255
255
|
@return $root;
|
256
256
|
}
|
257
|
+
|
258
|
+
//////////////////////////////
|
259
|
+
// Is Int and Is Float
|
260
|
+
//////////////////////////////
|
261
|
+
@function is-int($number) {
|
262
|
+
@if type-of($number) != 'number' {
|
263
|
+
@warn '#{$number} is not a number! It cannot be an integer if it is not a number!';
|
264
|
+
@return false;
|
265
|
+
}
|
266
|
+
@if $number - floor($number) != 0 {
|
267
|
+
@return false;
|
268
|
+
}
|
269
|
+
@else {
|
270
|
+
@return true;
|
271
|
+
}
|
272
|
+
}
|
273
|
+
|
274
|
+
@function is-float($number) {
|
275
|
+
@if type-of($number) != 'number' {
|
276
|
+
@warn '#{$number} is not a number! It cannot be an decimal if it is not a number!';
|
277
|
+
@return false;
|
278
|
+
}
|
279
|
+
@if $number - floor($number) != 0 {
|
280
|
+
@return true;
|
281
|
+
}
|
282
|
+
@else {
|
283
|
+
@return false;
|
284
|
+
}
|
285
|
+
}
|
286
|
+
|
287
|
+
@function is-decimal($number) {
|
288
|
+
@return is-float($number);
|
289
|
+
}
|