W3C home > Mailing lists > Public > public-css-archive@w3.org > February 2020

Re: [csswg-drafts] [css-color-5] color-contrast() needs resolution logic if 2 or more have the same contrast (#4732)

From: Chris Lilley via GitHub <sysbot+gh@w3.org>
Date: Mon, 03 Feb 2020 14:18:38 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-581435514-1580739516-sysbot+gh@w3.org>
Good catch, @argyleink I agree this needs to be specified

Given that the second parameter to `color-contrast` is a list of alternatives, then similar to other lists in CSS I suggest that the earliest match wins. In other words the logic is:

- if the list has one item, it wins
- if the list has two or more items, the first is the temporary winner but the next takes the winning place if it is *better*, and so on down the list

We also need to specify what happens if the first param is not a valid color, or any item of the second param are not valid colors.
- thus, a later item with the same score as an earlier item will not win.

-- 
GitHub Notification of comment by svgeesus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4732#issuecomment-581435514 using your GitHub account
Received on Monday, 3 February 2020 14:18:39 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:00 UTC