Skip to content

Commit

Permalink
Function now return a number instead of a list if a single number is …
Browse files Browse the repository at this point in the history
…provided
  • Loading branch information
pierreburel committed Sep 16, 2015
1 parent 38e65b1 commit cd36a15
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions _em.scss
Expand Up @@ -12,7 +12,7 @@
@return if($test-list == $list, space, comma);
}

@function em($values...) {
@function em($values...) {
$context: nth($values, length($values));
$result: ();
$separator: em-separator($values);
Expand All @@ -28,7 +28,7 @@
}
}

@return $result;
@return if(length($result) == 1, nth($result, 1), $result);
}

@mixin em($properties, $context) {
Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -1,7 +1,7 @@
{
"name": "sass-em",
"description": "Sass function and mixin to convert px in em.",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "https://github.com/pierreburel/sass-em",
"main": "_em.scss",
"authors": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "sass-em",
"version": "1.0.1",
"version": "1.0.2",
"description": "Sass function and mixin to convert px in em.",
"keywords": [
"sass",
Expand Down

0 comments on commit cd36a15

Please sign in to comment.