[csswg-drafts] [resize-observer] Resize events on inline elements (#4507)

bobOnGitHub has just created a new issue for https://github.com/w3c/csswg-drafts:

== [resize-observer] Resize events on inline elements ==
I see there was a discussion on resize events for inline elements in [How do we observe inline elements](https://github.com/WICG/ResizeObserver/issues/19)

The current state of affairs appears to be that events do not fire as a result of size changes to existing inline elements and this appears to be the agreed behaviour for ResizeObserver ([Observations do not fire for non-replaced inline Elements](https://drafts.csswg.org/resize-observer/#resize-observer-interface)).

Consequently, ResizeObserver is of no use with regard to inline elements.

Reading [here](https://github.com/WICG/ResizeObserver/blob/master/explainer.md) the case for ResizeObserver is the need to be able to react to a component size change. 

However, a component can be styled as inline by the consumer at which point you are back to square 1.

Example : 
Your component renders an image with height to match the host height. The host has been styled inline with font size 24pt. The user increases the fontsize to 48pt and you have no event to react to and re-render the image.

I can't see why it should matter whether the element is inline/block/inline-block etc. All that matters if you are monitoring size changes is size.

I'd suggest that ResizeObserver should fire an event for a size change on an observed element regardless of anything else. 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4507 using your GitHub account

Received on Monday, 11 November 2019 18:41:00 UTC