From cd36a15d8d32314c397593833470df41276245b2 Mon Sep 17 00:00:00 2001 From: Pierre Burel Date: Wed, 16 Sep 2015 20:42:38 +0200 Subject: [PATCH] Function now return a number instead of a list if a single number is provided --- _em.scss | 4 ++-- bower.json | 2 +- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_em.scss b/_em.scss index af8d065..a3eae93 100644 --- a/_em.scss +++ b/_em.scss @@ -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); @@ -28,7 +28,7 @@ } } - @return $result; + @return if(length($result) == 1, nth($result, 1), $result); } @mixin em($properties, $context) { diff --git a/bower.json b/bower.json index 61b471f..fcf9235 100644 --- a/bower.json +++ b/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": [ diff --git a/package.json b/package.json index 93ac5f3..3e1c9c0 100644 --- a/package.json +++ b/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",