Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rtlcss

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rtlcss - npm Package Compare versions

Comparing version 1.5.2 to 1.6.0

19

lib/prop.js

@@ -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); }',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc