soda-x / postcss-plugin-px2rem

postcss plugin px2rem
192 stars 29 forks source link

转换calc(100% -10px)错误 #23

Open ryan-117 opened 1 year ago

ryan-117 commented 1 year ago

calc(100% - 10px) 转换成了calc(90%)

配置: postcss: { plugins: [ require('postcss-plugin-px2rem')({ rootValue: 100, mediaQuery: false, minPixelValue: 1, selectorBlackList: [ 'no-parse', 'type-icon', 'ui-icon-', 'basis' ] }) ] } 项目中使用了ant-design-vue 1.x,postcss-plugin-px2rem将timeline组件中.ant-timeline-item-tail的样式height: calc(100% - 10px) 错误转换成了height: calc(90%)

ryan-117 commented 1 year ago

失算了。是less做的转换,不是'postcss-plugin-px2rem'的问题, calc(~"100% - 10px")可解