I currently have a draggable width container with some children.
Since its width is draggable once the width is small enough that say for example only 3 elements can fit. Expected outputs are (0), (1), and (+4) (Number of elements that overflow + 1).
Other cases: Here only two elements fit, and 4 overflows. The expected output is two circles with (0) and (+5).
I saw other posts where they use a fixed width and calculate the number of elements that can fit from that. However, in my use case, the width is varying and I need to get the number of elements that can fit/overflow dynamically. How can this be done using javascript and plain CSS?