w3c / w3c/csswg-drafts

[web-animations-1] Keyframe computed value computation is confusing

Open
#8,944 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs Edits web-animations-1
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

In https://drafts.csswg.org/web-animations-1/#calculating-computed-keyframes the spec tries to redefine how the cascade works, for example, saying that longhands override shorthands. This seem to imply that, e.g. in

@keyframes cascade-test {
    from {
      border-style: double;
      border: solid;
    }
    to {
      border-style: dashed;
      border: solid;
    }
  }

we would get an animation of a dashed/double border, instead of a solid border (as a true cascade would imply).

It's only reasonable to apply these rules to an API that takes a set of property declarations without ordering them.

IMHO, WA1 should only define a rule for ordering an unordered set of property values, and say that it only triggers if there is no inherent ordering in the API using it. And other than defining an order, it shouldn't try to interpret the properties, instead leaving that to CSS to define. (For example, WA1 gets the input to mapping between physical and logical properties wrong.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the “Calculating computed keyframes” section linked in the issue and trace how the provided @keyframes example is handled. Compare the current cascade interpretation with the proposed treatment of unordered property values, including physical and logical properties. Done means the Web Animations Level 1 wording clearly defines ordering without incorrectly interpreting CSS properties.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.