Closed mattdesl closed 8 years ago
I think a whitelist is better, as new properties become available you would have to always be in the know of what to blacklist and that can actually break things if you don't blacklist a specific property. For the whitelist, it's not a big deal if a new property is not 'px'ified, the dev could just add it herself. +1 for whitelisting
@mattdesl in my mind it's better to white list as there's way less numeric items you want to add 'px'
to.
Your black list will have more items and harder to manage.
The behaviour is now the same as React & jQuery, using a blacklist. Pushed to 2.x
since it is a major bump.
TweenLite uses a whitelist to only suffix certain properties [1]
jQuery uses a blacklist to suffix all properties except specific ones [2]
Which approach is best for a module like this? hmm