Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support ignore specified prop and value change from px to rem #1

Open
soda-x opened this issue Jun 23, 2016 · 5 comments
Open

support ignore specified prop and value change from px to rem #1

soda-x opened this issue Jun 23, 2016 · 5 comments

Comments

@soda-x
Copy link
Owner

soda-x commented Jun 23, 2016

support ignore specified prop and value change from px to rem

{
  rootValue: 100,
  unitPrecision: 5,
  propWhiteList: [],
  propBlackList: [],
  selectorBlackList: [],
  ignoreIdentifier: false,
+ ignorePropAndValue: [{
     border: ['1px' ]
  } , {
    margin: ['1px', '5px']
  }],
  replace: true,
  mediaQuery: false,
  minPixelValue: 0
}
@ziluo
Copy link

ziluo commented Jun 23, 2016

增强replace函数,把prop,selector,文件名和文件路径作为参数传递进去,理论上就可以覆盖100%场景了

@soda-x
Copy link
Owner Author

soda-x commented Jun 23, 2016

目前配置的 replace 是一种 fallback 机制

另外你说的增强 replace 函数,如果指的是那个正则表达式,那基本解决不了你的需求.
基于性能考虑,正则阶段是获取到 value 而不是表达式即 decl 阶段。

所以最好的解决方式是我上面那种方案。

@l-zhi
Copy link

l-zhi commented Sep 30, 2016

How to use it with "@Keyframes"

@soda-x
Copy link
Owner Author

soda-x commented Sep 30, 2016

enable mediaQuery

@SaltedFishYuto
Copy link

作者大大,最新版本怎么没这个属性

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants