1.1.3 • Published 11 months ago

postcss-transform-selector v1.1.3

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

install

npm install postcss-transform-selector --save-dev

demo

 // postcss.config.js
  {
    'postcss-transform-selector': {
      selector: ':root',
        transform: (decl) => {
          var oldValue = decl.value
          const val = oldValue.replace(/(\d*\.?\d+)(px)/g, (match, value, unit) => {
            return parseInt(value, 10) * 2 + unit;
          })
  
          decl.value = val;
        }
    },
  } 
1.1.3

11 months ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago