`width` update on window resize / orientation change?

The built-in width variable seems to be set automatically based on the window’s viewport width. When the device’s orientation changes, or the window is resized, does the width update as well?

What is the preferred way to make rendered cell outputs responsive to viewport width changes such as orientation change on mobile?

Yes, the cells which reference width get reevaluated on viewport width changes. Try opening any notebook with a diagram depending on width (e.g.), and then resizing a browser window to watch it update in response.

Ok thanks, confirmed. I wasn’t seeing it change because I was impatient. It does eventually re-render.