--
You received this message because you are subscribed to the Google Groups "style-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to style-dev+unsubscribe@chromium.org.
To post to this group, send email to styl...@chromium.org.
To view this discussion on the web, visit https://groups.google.com/a/chromium.org/d/msgid/style-dev/CAMLuWUz1UghmKTku5YE0Fa-J9eKO%3DuKVRiJe%2BZDaZ43EYjeTXw%40mail.gmail.com.
Hello style-dev
I'm trying to add some UI to the shadow DOM that requires the use of css keyframe animations, which looks like is currently not supported. The details are on bug: 724975. A patch to workaround the issue currently under review is here: crrev.com/2895913002/.
The question on the review is regarding whether adding keyframe animations in UA stylesheet will pollute the namespace for author animations. The patch in question is avoiding this by making sure that keyframe rules from UA stylesheets are used only for animations on a UA shadow DOM element. The current behaviour which isolates the scope of rules for author animations from shadow DOM elements is also retained. I'm not sure if this implementation is the best way to achieve this or if there is an alternate approach I could be considering.
Any pointers would be appreciated. For reference, the patch that needs to add the css animation is here: crrev.com/2898543002/.
I was in conversation with Khushal on this matter.The requirement is to define @keyframes rule in UA stylesheet, and apply it in user-agent shadow tree.As @keyframes identifiers are scoped per-tree, if one is defined in UA stylesheet, it doesn't apply to shadow trees.So probably the solution is to add<style>@keyframes -internal-media-controls-promo-throbbing { ... }</style>to each shadow tree attached to <video> element.
Looking up the keyframe name only for UA shadows sounds a very hacky workaround.
That said, for <progress> element or whatever element that uses UA shadow,it would be nice if CSS animations in UA style can be used for animating them.Duplicating the style for each element may not be very efficient in memory-wise,if 1000s of such elements are used in a page.