Skip to content

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

Open
Akimyou wants to merge 9 commits intosongsiqi:masterfrom
xianyukeji:master
Open

Add feature for reset rem with media query and property.#22
Akimyou wants to merge 9 commits intosongsiqi:masterfrom
xianyukeji:master

Conversation

@Akimyou
Copy link

@Akimyou Akimyou commented May 7, 2018

Px2rem is awesome, thank you.

I added new features to px2rem.

  • remResetMeidas: Specifies the media query condition and properties, automatically generated media query code for reset rem
  • remResetPropertys: Specifies the properties, the associated property values ​​will not be generated rem

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
Copy link

Coverage Status

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

@coveralls
Copy link

coveralls commented May 7, 2018

Coverage Status

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

@Akimyou
Copy link
Author

Akimyou commented May 7, 2018

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

@Akimyou
Copy link
Author

Akimyou commented May 8, 2018

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

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

Successfully merging this pull request may close these issues.

2 participants