<watched-box> is a damn fantastic tool. It’s a custom element that essentially does container queries by way of class names that get added to the box based on size breakpoints that are calculated with
ResizeObserver. It’s like a cleaner version of what Philip was talking about a few years ago.
I’m sure I’d be happy using
<watched-box> on production, as it’s lightweight, has no dependencies, and has a straightforward approach.… Read article “Playing With (Fake) Container Queries With watched-box & resizeasaurus”