css/css-color/animation/color-composition.html expects colors to add, which css-values-4 defines as not additive
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- css, html, javascript, playwright
Research direction
Start with css/css-color/animation/color-composition.html and compare its ten expected values with CSS Values 4 §§8.1.1 and 3, which the issue cites. Update the eight expectations that conflict with the specification; the two at progress 1 already agree. Check the test’s expected results against the listed compositions and progress values.
Written by the indexing model from the issue text.
Description
css/css-color/animation/color-composition.html expects a color keyframe composited by add to sum its channels with the underlying color: underlying rgb(50, 50, 50), from add rgb(10, 10, 10) to replace rgb(30, 30, 30), at 0 it expects rgb(60, 60, 60).
CSS Values 4, §8.1.1 Combination of <color>, reads "The <color> type is not additive.", as resolved in w3c/csswg-drafts#8576, and §3 reads "If a value type does not define a specific procedure for addition or is defined as not additive, its addition operation is simply Vresult = VB." So the add keyframe is its own color, and at 0 the result is rgb(10, 10, 10). Eight of the test's ten expectations differ; the two at progress 1 agree.
Steps to reproduce
Reproducer: https://gist.github.com/YevheniiKotyrlo/896f743fce1115cd6c42e8a0b9fff489
git clone https://gist.github.com/896f743fce1115cd6c42e8a0b9fff489.git wpt-color-composition
cd wpt-color-composition
sh ./run.sh
run.sh installs Playwright and runs repro.mjs, which reads §8.1.1 and §3 from the css-values-4 Editor's Draft and color-composition.html from wpt master, gives each expectation the value css-values-4 defines, and runs the same compositions in Chromium, Firefox and WebKit the way interpolation-testcommon.js does for Web Animations. It exits 1 while css-values-4 makes <color> not additive and the test expects a sum.
Expected
Each expectation is the add keyframe's own color interpolated to the replace keyframe's:
- underlying
rgb(50, 50, 50), fromadd rgb(10, 10, 10)toreplace rgb(30, 30, 30): at 0, 0.2, 1.2 and 1.5,rgb(10, 10, 10),rgb(14, 14, 14),rgb(34, 34, 34)andrgb(40, 40, 40) - underlying
rgb(60, 60, 60), fromadd rgb(0, 0, 0)toreplace rgb(50, 50, 50): at 0, 0.5, 1.2 and 1.5,rgb(0, 0, 0),rgb(25, 25, 25),rgb(60, 60, 60)andrgb(75, 75, 75)
The two expectations at progress 1 stay as they are.
Actual
On Windows 11 with Node 26.12.1 and Playwright 1.65.0:
css-values-4 at revision 6f177f4c13fbc3153474b66e88c25cf58ce5cfdd; color-composition.html from web-platform-tests/wpt@d4265db9011a846e8bd2b9911dc13159ae1f4a49 (master)
css-values-4 §8.1.1 Combination of <color>: "The <color> type is not additive."
css-values-4 §3 addition: "If a value type does not define a specific procedure for addition or is defined as not additive, its addition operation is simply Vresult = VB."
underlying rgb(50, 50, 50), from add rgb(10, 10, 10) to replace rgb(30, 30, 30):
at 0: the test expects rgb(60, 60, 60), css-values-4 gives rgb(10, 10, 10) <- differs
at 0.2: the test expects rgb(54, 54, 54), css-values-4 gives rgb(14, 14, 14) <- differs
at 1: the test expects rgb(30, 30, 30), css-values-4 gives rgb(30, 30, 30)
at 1.2: the test expects rgb(24, 24, 24), css-values-4 gives rgb(34, 34, 34) <- differs
at 1.5: the test expects rgb(15, 15, 15), css-values-4 gives rgb(40, 40, 40) <- differs
underlying rgb(60, 60, 60), from add rgb(0, 0, 0) to replace rgb(50, 50, 50):
at 0: the test expects rgb(60, 60, 60), css-values-4 gives rgb(0, 0, 0) <- differs
at 0.5: the test expects rgb(55, 55, 55), css-values-4 gives rgb(25, 25, 25) <- differs
at 1: the test expects rgb(50, 50, 50), css-values-4 gives rgb(50, 50, 50)
at 1.2: the test expects rgb(48, 48, 48), css-values-4 gives rgb(60, 60, 60) <- differs
at 1.5: the test expects rgb(45, 45, 45), css-values-4 gives rgb(75, 75, 75) <- differs
Chromium 158.0.8127.18, Firefox 159.0 and WebKit 27.2 each give the test's sums:
chromium 158.0.8127.18:
underlying rgb(50, 50, 50): 0 -> rgb(60, 60, 60); 0.2 -> rgb(54, 54, 54); 1 -> rgb(30, 30, 30); 1.2 -> rgb(24, 24, 24); 1.5 -> rgb(15, 15, 15)
underlying rgb(60, 60, 60): 0 -> rgb(60, 60, 60); 0.5 -> rgb(55, 55, 55); 1 -> rgb(50, 50, 50); 1.2 -> rgb(48, 48, 48); 1.5 -> rgb(45, 45, 45)
[…]
SUMMARY: css-values-4 makes <color> not additive (addition is Vresult = VB), and 8 of the 10 expectations of color-composition.html expect the add keyframe's colour summed with the underlying one
- Dominant language
- HTML
- Stars
- 6.3k
- Forks
- 4.1k
- Avg merge
- 17h 20m
- Merged PRs (30d)
- 841
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from web-platform-tests/wpt
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
web-platform-tests/wpt#65844 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
web-platform-tests/wpt#65836 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
web-platform-tests/wpt#65831 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
web-platform-tests/wpt#65826 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
web-platform-tests/wpt#65823 ·
Maintainers usually reply within 1 day
All issues in web-platform-tests/wpt
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
agent/scanner bug stage/010-actionable
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
torch-spyre/spyre-inference#1849 ·
Maintainers usually reply within 2 days
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day