Closed bradfier closed 5 months ago
For anyone else finding this issue after wrestling with this CSS themselves, we were able to work around it by using 'rootless' mode, introduced in knocklabs/react-notification-feed#7.
It would still be great to either mention this in the Knock documentation, or to fix the defaults so they don't apply down the entire tree.
I couldn't use the Container added in knocklabs/react-notification-feed#7 as children weren't correctly typed, opened knocklabs/react-notification-feed#46
The styles set on the
KnockFeedProvider
have the side effect of forcing every descendent element of the provider (i.e. your entire app, if you follow the README instructions) to use Knock'sfont-family
andbox-sizing
selection. The use of!important
here adds to the effect and forces proliferation of the tag to override it.If possible, could this be changed to only apply to elements with some
rnf
class rather than*
?https://github.com/knocklabs/react-notification-feed/blob/b601e88e403da7db3b699dd91b83773b7a8fcf4d/src/components/KnockFeedProvider/styles.css#L7-L10