wnr / element-resize-detector

Optimized cross-browser resize listener for elements.
MIT License
1.32k stars 118 forks source link

add important option for use with tools like cleanslate #98

Closed sanpoChew closed 6 years ago

sanpoChew commented 6 years ago

I thought that this could potentially be useful for other people, we are using this with widgets that are loaded on other peoples site and are using https://github.com/premasagar/cleanslate to ensure our styles aren't overwritten.

wnr commented 6 years ago

Interesting, give me a ping when this is ready for me too look at :)

sanpoChew commented 6 years ago

@wnr I've made the necessary changes for the object strategy as well as scroll and added some tests, we're actually using this in production already so I think it's good to go. I don't think the Travis failure is anything to do with me?

wnr commented 6 years ago

Thank you @sanpoChew. Indeed, the CI failing seems to be something else. I'll look into it. Actually, when I think about it, would it make sense to make everything always important? I can't come up with a case where one would like these properties to get overridden by another style rule. So I'm thinking about removing the option, and always enable this feature. What do you think?

sanpoChew commented 6 years ago

@wnr makes sense to me, can't think of a good reason why not 👍