Skip to content

Commit

Permalink
Version 2.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Brzek committed Nov 21, 2013
1 parent 06d42b2 commit 9b83ab0
Show file tree
Hide file tree
Showing 51 changed files with 162 additions and 124 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ README.md file is automatically generated.
**[Documentation](#documentation) |**

---
### Current version: v2.0.7 (2013-11-18)
### Current version: v2.0.8 (2013-11-21)
## Intro
Why LESS Hat? In August 2012, while we were developing and extending [CSS Hat](www.csshat.com) for LESS we needed universal mixins. Unfortunately, none of available were good enough that would satisfy our needs and that’s why we created new custom ones on our own, which have become the most popular mixin library for the whole LESS CSS.

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "lesshat",
"version": "2.0.7",
"version": "2.0.8",
"main": "./build/lesshat.less"
}
78 changes: 39 additions & 39 deletions build/lesshat-prefixed.less

Large diffs are not rendered by default.

78 changes: 39 additions & 39 deletions build/lesshat.less

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion mixins/animation-delay/animation-delay.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var animationDelay = function animationDelay(value) {
value = value || '0';
var valueRegex = /(?:\d)(?:ms|s)/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (!valueRegex.test(value) && value !== '0') {
value = value.replace(numWithoutValue, function(match) {
Expand Down
8 changes: 8 additions & 0 deletions mixins/animation-delay/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,12 @@ describe('animation-delay', function() {
test.animationDelay('9, 200', '9s, 200ms', done);
});

it('should return the same value', function(done) {
test.animationDelay('.2s', '0.2s', done);
});

it('should add unit and return the same value', function(done) {
test.animationDelay('.2', '0.2s', done);
});

});
2 changes: 1 addition & 1 deletion mixins/animation-duration/animation-duration.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var animationDuration = function animationDuration(value) {
value = value || '0';
var valueRegex = /ms|s/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (!valueRegex.test(value) && value !== '0') {
value = value.replace(numWithoutValue, function(match) {
Expand Down
6 changes: 5 additions & 1 deletion mixins/animation-duration/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ describe('animation-duration', function() {
test.animationDuration('5', '5s', done);
});

});
it('should return the same value', function(done) {
test.animationDuration('.3s', '0.3s', done);
});

});
2 changes: 1 addition & 1 deletion mixins/background-size/background-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var backgroundSize = function backgroundSize(value) {
value = value || 'auto auto';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (/^[-a-zA-Z0-9().\/]*,/.test(value)) {
value = value.replace(/(?:,)(?![^(]*\))/g, '');
Expand Down
4 changes: 4 additions & 0 deletions mixins/background-size/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ describe('background-size', function() {
test.backgroundSize('400 300', '400px 300px', done);
});

it('should return the same value', function(done) {
test.backgroundSize('.25em cover', '0.25em cover', done);
});

});
2 changes: 1 addition & 1 deletion mixins/blur/blur.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var blur = function blur(value) {
value = value || '0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
7 changes: 6 additions & 1 deletion mixins/blur/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@ describe('blur', function() {
test.blur('10', 'blur(10px)', done);
});

});
it('should return the same value', function(done) {
test.resultProperty = 'filter';
test.blur('0.6em', 'blur(0.6em)', done);
});

});
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var borderBottomLeftRadius = function borderBottomLeftRadius(value) {
value = value || '0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (/^[-a-zA-Z0-9().\/]*,/.test(value)) {
value = value.replace(/(?:,)(?![^(]*\))/g, '');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var borderBottomRightRadius = function borderBottomRightRadius(value) {
value = value || '0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (/^[-a-zA-Z0-9().\/]*,/.test(value)) {
value = value.replace(/(?:,)(?![^(]*\))/g, '');
Expand Down
2 changes: 1 addition & 1 deletion mixins/border-radius/border-radius.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var borderRadius = function borderRadius(value) {
value = value || '0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (/^[-a-zA-Z0-9().\/]*,/.test(value)) {
value = value.replace(/(?:,)(?![^(]*\))/g, '');
Expand Down
10 changes: 9 additions & 1 deletion mixins/border-radius/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,12 @@ describe('border-radius', function() {
test.borderRadius('20 30', '20px 30px', done);
});

});
it('should return the same value', function(done) {
test.borderRadius('0.33em', '0.33em', done);
});

it('should return the same value', function(done) {
test.borderRadius('.46em', '0.46em', done);
});

});
2 changes: 1 addition & 1 deletion mixins/border-top-left-radius/border-top-left-radius.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var borderTopLeftRadius = function borderTopLeftRadius(value) {
value = value || '0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (/^[-a-zA-Z0-9().\/]*,/.test(value)) {
value = value.replace(/(?:,)(?![^(]*\))/g, '');
Expand Down
2 changes: 1 addition & 1 deletion mixins/border-top-right-radius/border-top-right-radius.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var borderTopRightRadius = function borderTopRightRadius(value) {
value = value || '0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (/^[-a-zA-Z0-9().\/]*,/.test(value)) {
value = value.replace(/(?:,)(?![^(]*\))/g, '');
Expand Down
2 changes: 1 addition & 1 deletion mixins/box-shadow/box-shadow.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
boxShadow = function boxShadow(value) {
value = value || '0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (/^[-a-zA-Z0-9().\/]*,/.test(value)) {
value = value.replace(/(?:,)(?![^(]*\))/g, '');
Expand Down
6 changes: 5 additions & 1 deletion mixins/box-shadow/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ describe('box-shadow', function() {
test.boxShadow('5 4 100 rgba(20,20,20,0.5)', '5px 4px 100px rgba(20, 20, 20, 0.5)', done);
});

});
it('should return the same value', function(done) {
test.boxShadow('0em 0.125em 0.3125em 0em rgba(0, 0, 0, 0.5)', '0em 0.125em 0.3125em 0em rgba(0, 0, 0, 0.5)', done);
});

});
2 changes: 1 addition & 1 deletion mixins/column-gap/column-gap.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var columnGap = function columnGap(value) {
value = value || 'normal';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/column-rule/column-rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var columnRule = function columnRule(value) {
value = value || 'medium none black';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (/^[-a-zA-Z0-9().\/]*,/.test(value)) {
value = value.replace(/(?:,)(?![^(]*\))/g, '');
Expand Down
2 changes: 1 addition & 1 deletion mixins/column-width/column-width.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var columnWidth = function columnWidth(value) {
value = value || 'auto';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/contrast/contrast.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var contrast = function contrast(value) {
value = value || '100%';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/contrast/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ describe('contrast', function() {
test.contrast('200', 'contrast(200%)', done);
});

});
});
2 changes: 1 addition & 1 deletion mixins/drop-shadow/drop-shadow.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var dropShadow = function dropShadow(value) {
return value;
}
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (/^[-a-zA-Z0-9().\/]*,/.test(value)) {
value = value.replace(/(?:,)(?![^(]*\))/g, '');
Expand Down
2 changes: 1 addition & 1 deletion mixins/flex-basis/flex-basis.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var flexBasis = function flexBasis(value) {
value = value || 'auto';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/grayscale/grayscale.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var grayScale = function grayScale(value) {
value = value || '0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/hue-rotate/hue-rotate.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var hueRotate = function hueRotate(value) {
value = value || '0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/invert/invert.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var invert = function invert (value) {
value = value || '100%';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/perspective-origin/perspective-origin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var perspectiveOrigin = function perspectiveOrigin(value) {
value = value || '50% 50%';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (/^[-a-zA-Z0-9().\/]*,/.test(value)) {
value = value.replace(/(?:,)(?![^(]*\))/g, '');
Expand Down
2 changes: 1 addition & 1 deletion mixins/perspective/perspective.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var perspective = function perspective(value) {
value = value || 'none';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/rotate/rotate.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var rotate = function rotate(value) {
value = value || '0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/rotateX/rotateX.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var rotateX = function rotateX(value) {
value = value || '0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/rotateY/rotateY.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var rotateY = function rotateY(value) {
value = value || '0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/rotateZ/rotateZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var rotateZ = function rotateZ(value) {
value = value || '0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/saturate/saturate.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var saturate = function saturate(value) {
value = value || '100%';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/sepia/sepia.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var sepia = function sepia(value) {
value = value || '100%';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/skew/skew.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var skew = function skew(value) {
value = value || '0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/skewX/skewX.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var skewX = function skewX(value) {
value = value || '0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/skewY/skewY.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var skewY = function skewY(value) {
value = value || '0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (numRegex.test(value)) {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/transform-origin/transform-origin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var transformOrigin = function transformOrigin(value) {
value = value || '50% 50% 0';
var numRegex = /\d/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (/^[-a-zA-Z0-9().\/]*,/.test(value)) {
value = value.replace(/(?:,)(?![^(]*\))/g, '');
Expand Down
2 changes: 1 addition & 1 deletion mixins/transition-delay/transition-delay.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var transitionDelay = function transitionDelay(value) {
value = value || '0';
var valueRegex = /(?:\d)(?:ms|s)/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (!valueRegex.test(value) && value !== '0') {
value = value.replace(numWithoutValue, function(match) {
Expand Down
2 changes: 1 addition & 1 deletion mixins/transition-duration/transition-duration.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var transitionDuration = function transitionDuration(value) {
value = value || '0';
var valueRegex = /ms|s/gi;
var numWithoutValue = /(?:\s|^)(\d+\.?\d*)(?![^(]*\)|\w|%)/gi;
var numWithoutValue = /(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;

if (!valueRegex.test(value) && value !== '0') {
value = value.replace(numWithoutValue, function(match) {
Expand Down
Loading

0 comments on commit 9b83ab0

Please sign in to comment.