cuth / postcss-pxtorem

Convert pixel units to rem (root em) units using PostCSS
MIT License
2.03k stars 174 forks source link

Support for custom properties #48

Closed mevbg closed 4 years ago

mevbg commented 5 years ago

Is it possible to transform values of custom properties as well? For example to switch them on like so:

{
    propList: [
        'font',
        'font-size',
        'line-height',
        'letter-spacing',
        '--'
    ]
}
cuth commented 4 years ago

Ah, this would be a great feature.

cuth commented 4 years ago

We can use the wildcard to support custom variables: propList: ["--*"]

https://github.com/cuth/postcss-pxtorem/blob/e1467ab371fc1838759febb94789151de1a83ca5/spec/pxtorem-spec.js#L56