w3c / w3c/csswg-drafts

[css-values-4] mix() can not represent composition

Open
#9,342 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

css-values-5
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

For example, this requires a mix between three values:

  @keyframes anim {
    from {
      offset-distance: min(10px, 10%);
    }
    to {
      animation-composition: add;
      offset-distance: min(20px, 20%);
    }
  }
  div {
    offset-distance: min(30px, 30%);
    animation: anim 10s -1s linear paused;
  }

The computed value should be something like calc(min(30px, 30%) * 0.1 + min(10px, 10%) * 0.9 + min(20px, 20%) * 0.1), which mix() isn't able to represent.

See also https://github.com/w3c/csswg-drafts/issues/9341.

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 CSS Values 4 context in this issue and read the related issue 9341. Use the three-value animation-composition example to determine how the value representation should work; done means the specification can represent the shown composition and produce the described computed value.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.