A tight shrink wrapping implementation in modern browsers using progressive enhancement concept, see examples below for visual explanation. Requires scroll-driven animations to work, gracefully ignored in older browsers.
Making sure chat messages only span as wide as they have to.
Toasts already have tuiShrinkWrap directive on host.
Any valid CSS size string can be used, including calc , different units, vars and math functions.