benface
This may be a known issue (or, if not known, "expected" for some), but it was surprising to me, and I haven't seen it discussed so I thought I'd open an issue. Worst case, it can be about adding documentation for this behavior. First, it seems that style observer callbacks are not fired for `display: none` elements (or descendants of a `display: none` element) โ I realized that soon after I started to use the library, but I don't find it particularly unexpected (I assume it is a side effect of using transitions to detect changes, since transitions don't run on hidden elements). Thankfully, the callbacks _are_ called when the element becomes visible again, if the observed properties changed since the last time they were called. That seems to be the work of this [`RenderedObserver`](https://github.com/LeaVerou/style-observer/blob/main/src/rendered-observer.js) class, which is [instantiated for each new](https://github.com/LeaVerou/style-observer/blob/972e75a2eae0a3f77924feb6a50375682cf65a82/src/element-style-observer.js#L90) `ElementStyleObserver`. Unfortunately, in my application, I sometimes want to observe properties on elements whose `display` property is the infamous `contents` value. Perhaps surprisingly, it works perfectly! Except that `RenderedObserver` does not seem to do "its thing" on these elements: if the element becomes hidden temporarily (either due to its own `display` changing to `hidden`, or to an ancestor being hidden), and the observed properties happen to change while it's hidden, the callback does NOT get called when the element becomes visible again. Can anything be done about this, or not? Thank you so much. ๐