Skip to content

[css-color-adjust-1] Clear expectations for properties affected by forced colors in animation keyframes? #4176

Closed
@melanierichards

Description

@melanierichards

Suppose an author defines an animation outside of the forced-colors MQ, declaring property values in its keyframes which are typically reverted in forced color modes: https://jsfiddle.net/9ezqLfmt/

Prior implementations in MS browsers would allow this animation to run with the property values as specified by the author outside of the MQ, only updating the forced system colors for the given properties at the end of the animation. So in the given example, the background-color animates from red to yellow, then finally is computed to the value of the Window system color.

This is a bit jarring for the user. The better experience is probably to ensure that whatever UA guidance is given for the properties in Properties Affected by Forced Colors Mode applies to these properties inside of animation keyframes (animation origin) as well. Perhaps this is a given, but it might be worth explicitly calling out in the spec to avoid multiple interpretations or author confusion (given historical implementations).

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