Skip to content

[css-shadow-parts-1] Does @keyframes rule match in ::parts()? #1516

@TakayoshiKochi

Description

@TakayoshiKochi

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions