nilhave / gulp-px2rem-plugin Goto Github PK
View Code? Open in Web Editor NEW将px转换成rem
将px转换成rem
array_style.forEach(function(value){
^
TypeError: Cannot read property 'forEach' of null
比如:
div {
height: 10px;
p {
height: 6px;
}
}
会转成:
div {
height: 0.100000rem;
p {
height: 0.060000rem;
}
查看源码发现是正则匹配有bug,望修复~
由于用到了阿里的flexible适配布局,字体需要固定的,所以希望能增加一个这样的配置开关。
具体的选择器大概是这样子的
[data-dpr="1"] .f-size {
font-size: 14px;
}
[data-dpr="2"] .f-size {
font-size: 28px;
}
[data-dpr="3"] .f-size {
font-size: 42px;
}
最好能匹配
[data-dpr="1"]
[data-dpr="2"]
[data-dpr="3"] ,如果有这三个的话,那么该选择器里面的元素都不用转rem了
当输入的源css为空时会报错 “cannot read property 'forEach” of null
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.