govuk-frontend icon indicating copy to clipboard operation
govuk-frontend copied to clipboard

Documentation for `govuk-tint` perhaps wrong

Open klssmith opened this issue 3 years ago • 0 comments

Description of the issue

I am not sure that the docs for the govuk-tint function are correct. The percentage is described as the percentage of $colour in returned colour. When I've tried this out, a higher percentage adds more white to the colour, which seems to be the opposite of what the documentation suggests. govuk-tint is using mix under the hood, and the docs for that do suggest that the percentage is the percentage of the first colour, which is white in this case.

Steps to reproduce the issue

Actual vs expected behaviour

A style of govuk-tint(govuk-colour("blue"), 25) looks like this:

Screenshot 2022-09-21 at 16 53 51

A style of govuk-tint(govuk-colour("blue"), 75) looks like this:

Screenshot 2022-09-21 at 16 53 26

Environment (where applicable)

  • Operating system:
  • Browser:
  • Browser version:
  • GOV.UK Frontend Version:

klssmith avatar Sep 21 '22 16:09 klssmith