nanopop
nanopop copied to clipboard
Truncate when no viable match
It would be great if this could be extended such that in the case of failure to find any fit we could (optionally) discover the position-variant fit that has the smallest overflow and use that position but reduce the height / width of the popper so that it still fits on the screen.
Seems like in the case of a total miss, top & left of 0,0 is almost never what you want to happen.
Good point, since this is very much an edge-case... did this happen in your case? We could also think about an fallback so that you can specify which position should be taken if there is no space (e.g. bottom center on mobile devices since you might rather want to scroll down than left / right)