- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 03 Jun 2020 23:26:44 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `color-contrast needs another comma`, and agreed to the following: * `RESOLVED: Use vs in color-constrast function` <details><summary>The full IRC log of that discussion</summary> <heycam> Topic: color-contrast needs another comma<br> <heycam> github: https://github.com/w3c/csswg-drafts/issues/5087<br> <TabAtkins> yeah let's move on for the moment<br> <heycam> leaverou: I can take this<br> <heycam> ... right now we have the color-contrast function accepting a bg color and a list of fg colors<br> <heycam> ... supposed to choose the most contrasting color<br> <heycam> ... the first is space separated, the rest are commad separated<br> <heycam> ... makes it looks like the two are grouped together<br> <heycam> ... so this is a syntax issue, how do we make sure the first color stands out, and the comma separated ones are grouped togetehr<br> <heycam> ... one proposal is to use a comma, like in gradients<br> <heycam> ... another is to use a keyword like "versus" or "on" or "over"<br> <dino> document.getElementById("lea").playbackRate *= 0.5;<br> <heycam> ... another is to use a slash. a problem with that is inconsistent with other CSS, without parens or something, the slash has a different precedence compared to backgrounds<br> <heycam> chris: one other thing is that the first element is typically a background, but doesn't have to be<br> <heycam> leaverou: right if you reverse the colors you still get the same result<br> <heycam> florian: in terms of keywords, "against" might work to avoid indicating which is fg or bg<br> <heycam> chris: I also liked "vs"<br> <heycam> ... that would be my first choice<br> <heycam> AmeliaBR: for keywords, another could be "from"<br> <TabAtkins> I'm fine with "vs" or a plain comma.<br> <heycam> ... choosing a contrasting color from the list after<br> <jensimmons> q?<br> <florian> "vs" works for me<br> <heycam> ... syntax wise I prefer slash, but the concern about all the new color functions consistently using slash to separate the alpha value might be an issue<br> <heycam> leaverou: that's not a problem, grid-row/column uses slash like this<br> <heycam> ... but if you have slahes and commas at the same level<br> <jensimmons> q+<br> <heycam> ... if you have color / color+, it looks like the first two colors are grouped<br> <heycam> AmeliaBR: I don't think that's an issue or really consistent<br> <AmeliaBR> `color-contrast(wheat / tan, sienna)`<br> <heycam> leaverou: is there precedent for the opposite?<br> <heycam> TabAtkins: it is true that all the places we mix slash and comma, that slash is subordinate to the comma<br> <heycam> ... don't think that's necessarily a problem, but I'm fine with using a keyword here<br> <jensimmons> q?<br> <heycam> ... if we explicitly want to keep slash as a weaker precedence<br> <heycam> leaverou: also there's an option of using a function<br> <heycam> jensimmons: I hear people saying they like "vs", but I really don't<br> <Rossen_> ack jensimmons<br> <heycam> ... it doesn't feel expected from the PoV of authors<br> <heycam> ... I appreciate the consistency argument. is there another symbol we can use?<br> <heycam> leaverou: what about a function, that definitely makes the grouping obvious<br> <dino> (not so firm) vote for not using the / to avoid this inconsistent grouping/alternate issue, but i like / more than vs<br> <heycam> AmeliaBR: most cases that means having triple nested parens<br> <heycam> Rossen_: what about the "from" keyword?<br> <heycam> ... sounds fairly intuitive<br> <heycam> florian: if we're going with a keyword, I like vs better<br> <heycam> leaverou: I like against and vs better than from<br> <fantasai> +1 to leaverou<br> <heycam> argyle: [...]<br> <chris> vs for me too<br> <AmeliaBR> `color-contrast(var(--fg) from #002, #ffa)` `color-contrast(var(--fg) vs #002, #ffa)`<br> <heycam> myles: sounds like there's not argreement on keywords<br> <heycam> jensimmons: I really don't like it<br> <heycam> fantasai: there's keywords in gradients<br> <heycam> leaverou: I think the ship has sailed<br> <dino> LET'S USE EMOJI!<br> <heycam> argyle: I like keywords but vs doesn't feel right<br> <heycam> leaverou: to me keywords read like natural language which I think is something to strive for<br> <fantasai> s/vs doesn't feel right/against feels very English/<br> <heycam> ... keywords the precedence is still not completely clear<br> <astearns> prefers keywords to most magic-punctuation syntax<br> <heycam> myles: I'm not sure that's something to strive for<br> <fantasai> s/against/against I like against, but it/<br> <heycam> ... I don't think it'd be a good idea for properties to be full english sentences<br> <heycam> Rossen_: we also have a resolution to allow commas everywhere!<br> <AmeliaBR> q?<br> <heycam> myles: I don't think we do, I posted about that last week<br> <heycam> AmeliaBR: I think also, while discussing this, important to remember how this function works<br> <heycam> ... which I wasn't thinking of when I suggested keywords<br> <heycam> ... but you're picking a value from the list, contrasting it against the first value<br> <jensimmons> |<br> <heycam> ... it's the list you're picking from<br> <heycam> argyle: it sounds nice when you put it that way<br> <faceless2_> I think a keyword over /, I can't get past the precedence issue. commas just seem naturally lower priority than slash<br> <heycam> Rossen_: are we more leaning towards using "against"?<br> <heycam> ... if we used versus would it be abbreviated?<br> <heycam> florian: I hope so<br> <heycam> Rossen_: we don't use abbreviations anywhere else?<br> <heycam> plinss: only every unit type<br> <heycam> TabAtkins: "vs" is pretty universal<br> <heycam> dbaron: except in the legal system in the US, where it's "v"!<br> <TabAtkins> video game *and* movies<br> <chris> vs<br> <argyle> vs<br> <heycam> chris: let's go with vs<br> <heycam> leaverou: I'm fine with vs<br> <heycam> Rossen_: any objections to adding vs to the color-contrast function?<br> <AmeliaBR> ``color-contrast(var(--fg) vs #002, #ffa)`<br> <Rossen_> color-contrast(wheat vs tan, sienna, var(--myAccent), #d2691e)<br> <leaverou> color-contrast(wheat vs tan, sienna, var(--myAccent), #d2691e)<br> <heycam> dino: can someone type an example?<br> <TabAtkins> color-contrast(wheat vs tan, #00ff00, var(--foo))<br> <chris> yay!<br> <heycam> RESOLVED: Use vs in color-constrast function<br> <argyle> very nice<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5087#issuecomment-638512636 using your GitHub account
Received on Wednesday, 3 June 2020 23:26:48 UTC