Created
September 10, 2014 10:02
-
-
Save KittyGiraudel/5c4237518e62754e4a0a 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
| // ---- | |
| // Sass (v3.3.14) | |
| // Compass (v1.0.1) | |
| // ---- | |
| /** | |
| * Check whether `$list` contains `$value`. | |
| * @param {List} $list - List of values. | |
| * @param {*} $value - Value to check in the list. | |
| * @return {Bool} | |
| */ | |
| @function contains($list, $value) { | |
| @return not not index($list, $value); | |
| } | |
| /** | |
| * Check whether `$value` is a valid length. | |
| * @param {*} $value - Value to validate. | |
| * @return {Bool} | |
| */ | |
| @function is-length($value) { | |
| @return contains(0 "auto" "initial" "inherit", $value) | |
| or type-of($value) == "number" and not unitless($value) | |
| or str-slice($value + "", 1, 4) == "calc"; | |
| } | |
| /** | |
| * Check whether `$value` is a valid size. | |
| * @param {*} $value - Value to validate. | |
| * @return {Bool} | |
| * @requires {function} is-length | |
| */ | |
| @function is-size($value) { | |
| @return is-length($value) | |
| or contains("fill" "fit-content" "min-content" "max-content", $value); | |
| } |
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
| /** | |
| * Check whether `$list` contains `$value`. | |
| * @param {List} $list - List of values. | |
| * @param {*} $value - Value to check in the list. | |
| * @return {Bool} | |
| */ | |
| /** | |
| * Check whether `$value` is a valid length. | |
| * @param {*} $value - Value to validate. | |
| * @return {Bool} | |
| */ | |
| /** | |
| * Check whether `$value` is a valid size. | |
| * @param {*} $value - Value to validate. | |
| * @return {Bool} | |
| * @requires {function} is-length | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment