Closed cuth closed 7 years ago
what do you think about using *
more generally, instead of ~
, ^
and $
? so that:
['*position*']
=> ['~position']
['font*']
=> ['^font']
['*-radius']
=> ['$-radius']
@sndrs, I think you are right. That is easier to understand.
+1
@cuth , Thanks for your wonderful plugin.
As talked above, when can you modify the signs to @sndrs 's suggestion and merge the PR to master?
It's very useful to my project that I want almost every length props
can be auto translate to REM
Thanks again!
❤️ 😃
This is a PR to change
propWhiteList
topropList
.This would solve issue #1 by allowing strings to match the beginning, end or anywhere in the prop.
This would solve issue #25 by allowing wildcard and "not" selectors.
New option description:
propList
(Array) The properties that can change from px to rem.*
to enable all properties. Example:['*']
~
to match any part of the property. (['~position']
will matchbackground-position-y
)^
to match the start of the property. (['^font']
will matchfont-weight
)$
to match the end of the property. (['$-radius']
will matchborder-top-right-radius
)!
to not match a property. Example:['*', '!letter-spacing']
['*', '!~margin']
propWhiteList
will map topropList
for legacy support.