Comparing version 1.5.2 to 1.6.0
@@ -133,4 +133,4 @@ function main(configuration) { | ||
"expr": /^(?!text\-).*?transform$/ig, | ||
"match": /((translate)(x|3d)?|skew(x|y)?|rotate(z|3d)?|matrix)\((.|\s)*?\)/ig, | ||
"matrix": /matrix(.|\s)*?\(/i, | ||
"match": /((translate)(x|3d)?|skew(x|y)?|rotate(z|3d)?|matrix(3d)?)\((.|\s)*?\)/ig, | ||
"matrix": /matrix\(/i, | ||
"flipMatrix": function (value) { | ||
@@ -144,3 +144,12 @@ var i = 0; | ||
}, | ||
"rotate3D": /rotate3d(.|\s)*?\(/i, | ||
"matrix3D": /matrix3d\(/i, | ||
"flipMatrix3D": function(value){ | ||
var i = 0; | ||
return value.replace(/(\-?(\d?\.\d+|\d+))(?!d\()/ig, function (num) { | ||
if (++i == 2 || i == 4 || i == 5 || i == 13) | ||
return parseFloat(num, 10) * -1; | ||
return num | ||
}); | ||
}, | ||
"rotate3D": /rotate3d\(/i, | ||
"flipRotate3D": function (value) { | ||
@@ -158,3 +167,5 @@ var i = 0; | ||
for (var x = 0; parts && x < parts.length; x++) { | ||
if (parts[x].match(this.matrix)) | ||
if (parts[x].match(this.matrix3D)) | ||
parts[x] = this.flipMatrix3D(parts[x]); | ||
else if (parts[x].match(this.matrix)) | ||
parts[x] = this.flipMatrix(parts[x]); | ||
@@ -161,0 +172,0 @@ else if (parts[x].match(this.rotate3D)) |
{ | ||
"author": "Mohammad Younes", | ||
"name": "rtlcss", | ||
"version": "1.5.2", | ||
"version": "1.6.0", | ||
"description": "Framework for transforming cascading style sheets (CSS) from left-to-right (LTR) to right-to-left (RTL)", | ||
@@ -18,9 +18,9 @@ "bugs": "https://github.com/MohammadYounes/rtlcss/issues?state=open", | ||
"postcss": "^4.0.0", | ||
"chalk": "0.5.1", | ||
"chalk": "^1.0.0", | ||
"findup": "0.1.5", | ||
"strip-json-comments": "1.0.1", | ||
"strip-json-comments": "^1.0.0", | ||
"mkdirp": "0.5.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "1.21.4" | ||
"mocha": "^2.0.0" | ||
}, | ||
@@ -27,0 +27,0 @@ "scripts": { |
@@ -364,2 +364,5 @@ <img title="RTL CSS" src="https://cloud.githubusercontent.com/assets/4712046/5889219/190f366a-a425-11e4-8ef5-8b5f60a9e903.png" align="right"/> | ||
## Release Notes | ||
* **v1.6.0** [15 Mar. 2015] | ||
* Support flipping `matrix3d` transform. | ||
* **v1.5.2** [28 Feb. 2015] | ||
@@ -366,0 +369,0 @@ * Fix flipping string maps containing regular expressions special characters (Fixes [#24](https://github.com/MohammadYounes/rtlcss/issues/24)). |
@@ -465,2 +465,8 @@ var assert = require("assert"); | ||
{ | ||
'should': 'Should mirror transform : matrix3d', | ||
'expected': 'div { transform:matrix3d(0.227114470162179, 0.127248412323519, 0, 0.000811630714323203, 0.113139853456515, 1.53997196559414, 0, 0.000596368270149729, 0, 0, 1, 0, -165, 67, 0, 1); }', | ||
'input': 'div { transform:matrix3d(0.227114470162179, -0.127248412323519, 0, -0.000811630714323203, -0.113139853456515, 1.53997196559414, 0, 0.000596368270149729, 0, 0, 1, 0, 165, 67, 0, 1); }', | ||
'reversable': true | ||
}, | ||
{ | ||
'should': 'Should mirror transform : translate', | ||
@@ -467,0 +473,0 @@ 'expected': 'div { transform: translate(-100px); }', |
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
105427
2092
458
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedstrip-json-comments@1.0.4(transitive)
+ Addedsupports-color@2.0.0(transitive)
- Removedansi-regex@0.2.1(transitive)
- Removedansi-styles@1.1.0(transitive)
- Removedchalk@0.5.1(transitive)
- Removedhas-ansi@0.1.0(transitive)
- Removedstrip-ansi@0.3.0(transitive)
- Removedstrip-json-comments@1.0.1(transitive)
- Removedsupports-color@0.2.0(transitive)
Updatedchalk@^1.0.0
Updatedstrip-json-comments@^1.0.0