ResizeObserver in WebKit

ResizeObserver has hit WebKit Safari Technology Preview releases by default as of version 97l. Rather than focus on how slow webkit were to enable this feature (Chrome released this in Jan 2018) let’s rejoice in the fact that another browser supports this (Chrome, FF, Edge, Opera… all desktop). The article has a great example and code to show how this might be used on your site and can provide a bit of a temporary patch for container queries.

ResizeObserver was introduced to solve this problem, allowing authors to observe changes to the layout size of elements. It was first made available in Chrome 64 in January 2018, and it’s now in Safari Technology Preview releases (and Epiphany Technology Preview). ResizeObserver was enabled by default as of Safari Technology Preview 97.

An excerpt from ResizeObserver in WebKit

View original article

Subscribe to our Newsletter

Add your email address and receive an email every Friday covering off everything worth knowing about building your websites responsively.