-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I'm trying to implement breakpoints like this article:
https://philipwalton.com/articles/responsive-components-a-solution-to-the-container-queries-problem/#observing-container-resizes
Essentially I want the parentNode object to have classes like .SM .MD .LG depending on how big they are. The problem is accessing either the parentNode or embedding content in the children of the . Neither are easy.
The resize and reflow, only return the rect, which is great, but they could easily return the parentNode as well. This would make it much more useful in this usecase. If you embed content as children like <ResizeObserver>{children}</ResizeObserver>
then the content isn't passed through.
In the version I'm running locally, I just extend the reflow, resize, position to also return the parentNode. would you guys be open to me creating a PR to extend it to return parentNode as well?