youtube image
From YouTube: Pair Programming - Does offsetWidth always force layout recalculation?

Description

Do calls to `offsetWidth` always force a layout recalculation, even in ResizeObserver callbacks? Let's find out!

- Originating comment:
https://gitlab.com/gitlab-org/gitlab-ui/merge_requests/810#note_231406426

- Relevant Firefox source code:
https://dxr.mozilla.org/mozilla-central/rev/d42c22627c8dee9e9286fd5d7bbc3d02afbfad44/dom/base/Element.cpp#931

- Resulting experiment (with clean up):
https://codesandbox.io/s/peaceful-gates-47rnl?fontsize=14