Tuesday, 9 May 2023

How to listen to Container Style Query change

Update 1 - I found a horrible workaround based on a custom property + ResizeObserver + window.getComputedStyle(), it might hold the water until a better solution arrives. It'd be still be great to know if the listener is coming.

I'm looking to add a listener for a container style query change after exhausting all other avenues (such as MutationObserver etc.), by analogy with media queries.

Does this possibility exist even as an experimental feature or is it planned at all any inside is highly appreciated.



from How to listen to Container Style Query change

No comments:

Post a Comment