postcss-px-to-viewport icon indicating copy to clipboard operation
postcss-px-to-viewport copied to clipboard

A plugin for PostCSS that generates viewport units (vw, vh, vmin, vmax) from pixel units. The best choice to create a scalable interface on different displays by one design size.

Results 108 postcss-px-to-viewport issues
Sort by recently updated
recently updated
newest added

比如正常1400px宽度适配,小于1400px进行缩放,但是大于1400px的屏幕没必要放大,这样可以多显示一些内容。

It would be nice if this plugin can be upgrade to PostCSS 8 new API. https://github.com/postcss/postcss/releases/tag/8.0.0

I referenced postcss-px-to-viewport in the project created by vue-cli, and there will be a prompt when packaging Building for production...postcss-px-to-viewport: postcss.plugin was deprecated. Migration guide: https://evilmartians.com/chronicles/postcss-8-plugin-migration

module.exports = { plugins: { autoprefixer: {}, 'postcss-px-to-viewport': { unitToConvert: 'px', // 需要转换的单位,默认为"px" viewportWidth: 375, // 设计稿的视口宽度,一般是375左右,iphone和很多安卓机等机型都差不多,ipad除外。如果是viewportWidth是375,font-size:14,那么font-size会转换为3.73333vm,计算过程:14÷375×100=3.73333 unitPrecision: 5, // 单位转换后保留的精度 propList: ['*'], // 能转化为vw的属性列表 viewportUnit: 'vw', // 希望使用的视口单位 fontViewportUnit:...

postcss-px-to-viewport 限制了最大宽度750px,但是px转测vw后超过最大限制还是会随着屏幕的变大而变大,有没有一个参数是vm参考的最大值,

![image](https://user-images.githubusercontent.com/58016208/127418573-1f197500-80eb-4952-b37e-0e30c8ea0600.png)

when i use [email protected] in [email protected] and changed landscape to true it goes wrong with postcss.atRule is not a constructor hope to fix this

/* px-to-viewport-ignore-next */ 注释无效 还是转换成了vw

npm install postcss-px-to-viewport --save-dev npm ERR! code EINTEGRITY npm ERR! sha1-VMWpZEYr49TXivYxNjwY1vqRrCY= integrity checksum failed when using sha1: wanted sha1-VMWpZEYr49TXivYxNjwY1vqRrCY= but got sha512-KU/VDjC5RwtDUZiz3d+DHXJF2lp5hB9dn552TXIyptj 8SH1vXmR40mG0JgGq03IlYsOgGfcv8xrLpSQ0YUMQdA== sha1-U/NJu5hqsnPWARdaobJaZVq5DuM=. (3771 bytes)