less / less/less-docs

Document the exact mathematical formulae for mix function

Open
#452 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue up-for-grabs
Dominant language
Less
Stars
680
Forks
442
PR merge metrics
No merged PRs in 30d

Description

Please document the exact mathematical formulae for blending functions.

In the years I've been using LESS I was never able to memorize whether

mix(@color1, @color2, @t)

means (in pseudocode)

(1-@t) * @color1 + @t * @color2

or

(1-@t) * @color2 + @t * @color1

I keep making mistakes, and the documentation is unhelpful because it neither documents the exact mathematical formula nor even uses a @t that is not 50%, making it impossible to deduce.

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 by locating the documentation for the mix blending function and review its current examples. Document the exact formula for the @t parameter and include an example using a value other than 50%, so the argument order can be determined unambiguously.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.