postcss-pxtorem icon indicating copy to clipboard operation
postcss-pxtorem copied to clipboard

Convert pixel units to rem (root em) units using PostCSS

Results 57 postcss-pxtorem issues
Sort by recently updated
recently updated
newest added

My project uses vue3+Vant4+vite with [email protected], after building the project. Some css files not covert px to rem properly. Anyone know this root cause? ![image](https://github.com/user-attachments/assets/1c8b0dd8-84ab-471e-a827-b36e15b7cb28) Project config show as the...

I'm building a mobile project using Vite, Vant, and PostCSS-pxtorem. When I run npm run dev, the CSS units of Vant's global variables are compiled to rem. However, after a...

``` module.exports = { plugins: { 'postcss-pxtorem': { rootValue({ file }) { console.log(file, file.includes('node_modules/vant')) return file.includes('node_modules/vant') ? 37.5 : 75; }, propList: ['*'], }, }, } ```

I am currently using vite+vue3 to build the project and only want to do rem adaptation for mobile, this is my code: exclude: function (file) { return file.indexOf('m/') === -1...

Hello there! Is there any way to let postcss-pxtorem to convert the css var values? It is not automatically converting my ``` --text-lg: 16px; ``` to ``` --text-lg: 1rem; ```...

add exclude verify type of RegExp: if exclude type is Function, it has a bug eg: postCssPxToRem({ exclude: (filePath) => { const reg = /src\/pages\/m|src\/components\/m|share\/components\/m/; return !reg.test(filePath); }, }) if...