Created attachment 160338 [details] repro When new shadow roots are added to the shadow host or content distribution is changed, the shadow host is reattached (detached and lazyAttached). However, the detach clear the shadow host's style (the style is set to be null). The detach is invoked not during recalcStyle. So suppose that adding a shadow root and applying css transition to the shadow host in the same time. Since the shadow host's style is reset, no css transition can be started. This looks not good. So it might be better to set some flag here and to recreate a renderer during in Element::recalcStyle (i.e. during recalcStyle).
The spec is not clear whether CSS transitions should be applied in this case.
We don't do this anymore.