CSS unit conversion that stays close to your PostCSS pipeline. Choose a focused plugin for a familiar API, or compose rules when your design system needs more room.
| You start with | You need | Start here |
|---|---|---|
rem | px or rpx | postcss-rem-to-responsive-pixel |
rem | vw, vh or another viewport unit | postcss-rem-to-viewport |
px | platform-aware rpx, rem, vw or px | postcss-pxtrans |
| mixed units | px with a custom unit map | postcss-units-to-px |
| mixed units | composable rules and presets | postcss-rule-unit-converter |
Every plugin is published independently and tested against PostCSS 8. Shared matching, rounding, exclusion and declaration helpers live in postcss-plugin-shared, so the focused packages can keep their APIs small.