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 2.3.0 to 2.4.0

4

CHANGELOG.md

@@ -0,1 +1,5 @@

## 2.4.0 - 20 Jun. 2018
* New Option:
* `useCalc` (default: `false`) to flip unit based `background-position` using `calc`. **Thanks @zoreet**
## 2.3.0 - 9 Jun. 2018

@@ -2,0 +6,0 @@ * Skip processing CSS variables. **Thanks @danfooo**

@@ -24,2 +24,3 @@ 'use strict'

addKey('stringMap', [])
addKey('useCalc', false)

@@ -26,0 +27,0 @@ // default strings map

@@ -418,3 +418,5 @@ 'use strict'

? context.util.complement(parts[0])
: context.util.swapLeftRight(parts[0]))
: (parts[0].match(this.cache.length)
? this.flipLength(parts[0], context)
: context.util.swapLeftRight(parts[0])))
state.value = state.value.replace(this.cache.match, function () { return parts.shift() })

@@ -425,2 +427,8 @@ }

},
'flipLength': function (value, context) {
if (context.config.useCalc) {
return 'calc(100% - ' + value + ')'
}
return context.util.swapLeftRight(value)
},
'update': function (context, value, name) {

@@ -443,2 +451,3 @@ if (name.match(this.cache.gradient)) {

'position': context.util.regex(['position'], 'g'),
'length': context.util.regex(['length'], 'gi'),
'gradient': /gradient$/i,

@@ -445,0 +454,0 @@ 'angle': /\d+(deg|g?rad|turn)/i,

2

package.json
{
"author": "Mohammad Younes",
"name": "rtlcss",
"version": "2.3.0",
"version": "2.4.0",
"description": "Framework for transforming cascading style sheets (CSS) from left-to-right (LTR) to right-to-left (RTL)",

@@ -6,0 +6,0 @@ "homepage": "http://rtlcss.com/",

@@ -122,3 +122,10 @@ module.exports = [

'reversable': true
},
{
'should': 'Should flip background-position when expressed in units (useCalc:true)',
'expected': 'div { background-position: calc(100% - 10px) 0 }',
'input': 'div { background-position: 10px 0 }',
'reversable': false,
'options': { 'useCalc': true }
}
]
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