Modern JavaScript gives us a lot of expressive tools. Sometimes a little too many. Optional chaining, nullish coalescing, ternaries, spread, template literals. I like all of them and use them every day. But together, they make it really…
If you’ve ever built a tooltip, a footnote, or a popover then you’ve written some version of this: Looks fine, right? Until the window resizes. Or until the page scrolls. Or the tooltip happens to land near the bottom of the viewport and…