Comparing version 2.0.4 to 2.0.5
@@ -0,1 +1,4 @@ | ||
### 2.0.5 - 17 May. 2016 | ||
* Fixes a bug in complementing calc values (Fixes [#71](https://github.com/MohammadYounes/rtlcss/issues/71)). | ||
### 2.0.4 - 25 Apr. 2016 | ||
@@ -2,0 +5,0 @@ * Fixes a bug in flipping cursor value (Fixes [#68](https://github.com/MohammadYounes/rtlcss/issues/68)). |
/* | ||
* RTLCSS 2.0.4 https://github.com/MohammadYounes/rtlcss | ||
* RTLCSS 2.0.5 https://github.com/MohammadYounes/rtlcss | ||
* Framework for transforming Cascading Style Sheets (CSS) from Left-To-Right (LTR) to Right-To-Left (RTL). | ||
@@ -4,0 +4,0 @@ * Copyright 2016 Mohammad Younes. |
@@ -105,3 +105,3 @@ 'use strict' | ||
state.value = state.value.replace(REGEX_COMPLEMENT, function (num) { | ||
return REGEX_TOKEN_REPLACEMENT.test(num) ? num.replace(REGEX_TOKEN_REPLACEMENT, function (m) { return '(100%-' + m + ')' }) : 100 - parseFloat(num, 10) | ||
return REGEX_TOKEN_REPLACEMENT.test(num) ? num.replace(REGEX_TOKEN_REPLACEMENT, function (m) { return '(100% - ' + m + ')' }) : 100 - parseFloat(num, 10) | ||
}) | ||
@@ -108,0 +108,0 @@ return this.restoreTokens(state) |
{ | ||
"author": "Mohammad Younes", | ||
"name": "rtlcss", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "Framework for transforming cascading style sheets (CSS) from left-to-right (LTR) to right-to-left (RTL)", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/MohammadYounes/rtlcss/issues?state=open", |
@@ -10,3 +10,3 @@ module.exports = [ | ||
'should': 'Should complement percentage horizontal position with calc', | ||
'expected': 'div {background-position:calc(100%-(30% + 50px)) 75%;}', | ||
'expected': 'div {background-position:calc(100% - (30% + 50px)) 75%;}', | ||
'input': 'div {background-position:calc(30% + 50px) 75%;}', | ||
@@ -23,3 +23,3 @@ 'reversable': false | ||
'should': 'Should complement percentage horizontal position with calc', | ||
'expected': 'div {background-position:calc(100%-(30% + 50px)) calc(30% + 50px), 10.75% top;}', | ||
'expected': 'div {background-position:calc(100% - (30% + 50px)) calc(30% + 50px), 10.75% top;}', | ||
'input': 'div {background-position:calc(30% + 50px) calc(30% + 50px), 89.25% top;}', | ||
@@ -54,3 +54,3 @@ 'reversable': false | ||
'should': 'Should complement percentage with calc: position-x', | ||
'expected': 'div {background-position-x:calc(100%-(30% + 50px)), -webkit-calc(100%-(30% + 50px));}', | ||
'expected': 'div {background-position-x:calc(100% - (30% + 50px)), -webkit-calc(100% - (30% + 50px));}', | ||
'input': 'div {background-position-x:calc(30% + 50px), -webkit-calc(30% + 50px);}', | ||
@@ -57,0 +57,0 @@ 'reversable': false |
@@ -16,3 +16,3 @@ module.exports = [ | ||
'should': 'Should complement calc horizontal position', | ||
'expected': '.banner { background: calc(100%-(19% + 2px)) top url(topbanner.png) #00D repeat-y fixed; }', | ||
'expected': '.banner { background: calc(100% - (19% + 2px)) top url(topbanner.png) #00D repeat-y fixed; }', | ||
'input': '.banner { background: calc(19% + 2px) top url(topbanner.png) #00D repeat-y fixed; }', | ||
@@ -19,0 +19,0 @@ 'reversable': false |
@@ -16,3 +16,3 @@ module.exports = [ | ||
'should': 'Should mirror calc (x-offset)', | ||
'expected': 'div { transform-origin: -moz-calc(100%-(((25%/2) * 10px))); }', | ||
'expected': 'div { transform-origin: -moz-calc(100% - (((25%/2) * 10px))); }', | ||
'input': 'div { transform-origin: -moz-calc(((25%/2) * 10px)); }', | ||
@@ -53,3 +53,3 @@ 'reversable': false | ||
'should': 'Should mirror with x being calc (x-offset y-offset)', | ||
'expected': 'div { transform-origin: -webkit-calc(100%-(15% * (3/2))) 30.25%; }', | ||
'expected': 'div { transform-origin: -webkit-calc(100% - (15% * (3/2))) 30.25%; }', | ||
'input': 'div { transform-origin: -webkit-calc(15% * (3/2)) 30.25%; }', | ||
@@ -96,3 +96,3 @@ 'reversable': false | ||
'should': 'Should not mirror with x being calc (y-offset-keyword x-offset)', | ||
'expected': 'div { transform-origin:top calc(100%-(((140%/2)))); }', | ||
'expected': 'div { transform-origin:top calc(100% - (((140%/2)))); }', | ||
'input': 'div { transform-origin:top calc(((140%/2))); }', | ||
@@ -121,3 +121,3 @@ 'reversable': false | ||
'should': 'Should mirror with x being calc (x-offset y-offset z-offset)', | ||
'expected': 'div { transform-origin: calc(100%-(25% * 3 + 20px)) 30% 10%; }', | ||
'expected': 'div { transform-origin: calc(100% - (25% * 3 + 20px)) 30% 10%; }', | ||
'input': 'div { transform-origin: calc(25% * 3 + 20px) 30% 10%; }', | ||
@@ -124,0 +124,0 @@ 'reversable': false |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
157146