Closed shepherdwind closed 7 years ago
使用方式
const input = 'h1 { margin: 0 0 20rpx 20rpx; font-size: 32px; line-height: 1.2; letter-spacing: 1rpx; }'; const output = 'h1 { margin: 0 0 0.2rem 0.2rem; font-size: 0.64rem; line-height: 1.2; letter-spacing: 0.01rem; }'; const processed = postcss(pxtorem({ rootValue: { px: 50, rpx: 100 }, })).process(input).css; expect(processed).toBe(output);
Coverage increased (+0.2%) to 98.462% when pulling 67e1d509f9ad254ad6848bb77e397e4e457153b3 on shepherdwind:rpx-support into c4cf164336d0bc291d006a37cfee3d7ff876f587 on ant-tool:master.
0.7.0
使用方式