w3c / w3c/csswg-drafts

[css-images-3] Interpolating A with cross-fade(p% A, B)

Open
#2,853 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Closed Accepted by CSSWG Resolution css-images-4 Needs Edits
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

Based on the currently proposed cross-fade() interpolation algorithm, the titular example would produce something like cross-fade(x% A, cross-fade(p% A, B)), x∈[0, 100].

It seems far more sensible to promote the first operand to cross-fade(100% A, B) so that it can be interpolated by just the percentage (cross-fade(x% A, B), x∈[p, 100]), which avoids redundant nesting.

Note that Chrome currently doesn't seem to handle this at all: http://dabblet.com/gist/efb891a971d4255e4a21bad677e4780c

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 cross-fade() interpolation algorithm proposed in the linked CSSWG issue, then review the cross-fade(x% A, B) example and the Chrome behavior shown in the linked dabblet. The work is done when the interpolation behavior and handling of the promoted first operand are resolved and reflected in the relevant CSS specification text.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.