Closed dreamjser closed 8 years ago
Thank you for your pull request. I am considering adding it but there is already a way to ignore values.
https://github.com/cuth/postcss-pxtorem#a-message-about-ignoring-properties
This allows you to ignore border: 1PX
but not letter-spacing: 1px
.
this 1px option is useful to those project which is already 1px
inside not 1PX
. At most situation when we write 1px
we really mean that retina 1px and hope not to be replaced by REM, so I use this PR in my project.
+1 to merge it
@cuth I use stylus with postcss and "1PX" is changed by stylus to "1 PX" (not sure why) so I can't use this method
Thanks to @dreamjser for the PR
I think you've convinced me but I'd rather see this option as a minimum pixel value with the default being zero. Then you could set it to 2 if you wanted to avoid converting 1px
.
// default
{
minPixelValue: 0
}
// to avoid 1px
{
minPixelValue: 2
}
Also, I would like to deprecate all the underscores and change the options to camelCase.
Would this option satisfy you?
Even better :+1:
Cheers, That is more graceful.
add option to set whether replace 1px to rem(in production 1px to rem can't show)