-
Notifications
You must be signed in to change notification settings - Fork 756
Description
Context: https://crbug.com/724975
Spec: https://tabatkins.github.io/specs/css-shadow-parts/
Suppose we have the following style in document:
@keyframes test {
to { transform: rotate(360deg); }
}
#host::part(label) {
animation: test infinite 1s;
}Does this work, or this should not work?
Specifically, will animation: test apply to the ::part(label)?
In today's Blink implementation, it does not.
For pseudo elements implemented inside UA shadow (e.g. ::-webkit-slider-thumb, or input::placeholder), as the keyframe rule name lookup is scoped, and the selector and the element are in the different trees, test keyframe rule name lookup fails and thus the animation will not be applied.
For these elements, which are implemented within UA shadow DOM, it is just an implementation detail and maybe Blink should apply the test keyframe rule to those, but for ::part(), the actual element would be in shadow DOM, and clarification is needed.