songsiqi / px2rem

According to one stylesheet, generate rem version and @1x, @2x and @3x stylesheet.
558 stars 92 forks source link

Add feature for reset rem with media query and property. #22

Open Akimyou opened 6 years ago

Akimyou commented 6 years ago

Px2rem is awesome, thank you.

I added new features to px2rem.

It seems that the functions are similar to /**/, but they can be configured globally, especially to avoid code repeated media queries.

remResetMeidas can be used to improve the reading experience of small-screen mobile phones. Many designs use 375 as the standard width. After using the rem scheme, the mobile phone with a width >= 375 is generally normal, but the size of a mobile phone with a size <375 is relatively small (eg iPhone SE). So width <375 (width less than design draft) can use it to reset all font-size rem.

remResetPropertys can be use to reset all border, etc...

Thanks.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 0ace1e8324b023a537b87de81448592592c38af1 on xianyukeji:master into 20e30faa399c1797357968b6c2c62f134ebe184b on songsiqi:master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling b406280ed6ef9e8f093c0615f7d4c66a94b81592 on xianyukeji:master into 20e30faa399c1797357968b6c2c62f134ebe184b on songsiqi:master.

Akimyou commented 6 years ago

This is the preview npm pkg. https://www.npmjs.com/package/xianyukeji-px2rem

Akimyou commented 6 years ago

This is the preview postcss plugin npm pkg for xianyukeji-px2rem. https://www.npmjs.com/package/xianyukeji-postcss-px2rem