marcj / css-element-queries

CSS Element-Queries aka Container Queries. High-speed element dimension/media queries in valid css.
http://marcj.github.io/css-element-queries/
MIT License
4.27k stars 487 forks source link

Feature request: Delayed call of the callback function. #308

Open VARGA-Peter opened 3 years ago

VARGA-Peter commented 3 years ago

I love the plugin. Finally, I can easy get the size of an element I need to know.

I would like to propose here a feature: Currently, the function is called each time the element is resized. What about a 2nd functionality, that the function isn't called each time but once the resize has been finished. Of course, when has been such a resize finished?

I would suggest to use a delay which can be provided to the sensor [for example 0.5 seconds] and when after this delay the element hasn't been resized the callback function will be called.

Cheers!°