Re: [csswg-drafts] Allow specifying the "accent color" of a form control element (#5187)

The CSS Working Group just discussed `Allow specifying the "accent color" of a form control element`.

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: Allow specifying the "accent color" of a form control element<br>
&lt;dael> github:<br>
&lt;dael> Mason: Proposal is add ability to spec accent color for form control elements.<br>
&lt;dael> Mason: These are the ones that can't be styled, particularly color. Looked at most form control elements. Put together a study<br>
&lt;dael> masonfreed_: Conclusion I came to is it seems we would need foreground and background color. Many form controls accent have 2 colors. Absent that we would need magic to ensure contrast<br>
&lt;dael> masonfreed_: In many cases it seemed like magic that would get in the way for devs.<br>
&lt;dael> masonfreed_: Motivation for us is Chrome recently changed from gray to blue and that caused a lot of problems for devs that had a theme on their site.<br>
&lt;dael> masonfreed_: Not full styling but this seems to eliminate a lot of problems<br>
&lt;TabAtkins> q+<br>
&lt;astearns> q+<br>
&lt;dael> masonfreed_: I did propose some spec language. accent-color-background and -foreground. It's nec. vauge because impelmentation varies across browsers. Even if impl is different across browsers there's still value in being able to say here is what I would prefer.<br>
&lt;astearns> ack TabAtkins<br>
&lt;dael> TabAtkins: Overall I like the idea. Similar to explorations a few years ago where we suspected we could boil down color choices<br>
&lt;dael> TabAtkins: On studies, checkmarks you have background as background behind glyph. Screenshot has white checkmark and blue background, but I think usual is dark glyph on light background. Might be fine.<br>
&lt;myles> q+<br>
&lt;dael> TabAtkins: More important is range inputs. Color of progress bar and range input sounds like something to put under control of page. But that's not being colors by either you provide. YOu give reasons, particularly for range inputs, but it does worry me that's a missing thing<br>
&lt;dael> TabAtkins: I think it's really the only missing thing<br>
&lt;dael> masonfreed_: On checkbox and radio. It was modern chrome. Impl differ quite a bit and across platforms on same browser. That was a more motivating case for both.<br>
&lt;emilio> q+<br>
&lt;dael> masonfreed_: On range control, it's a general question. this isn't exhastive list. Can't tackle all. Range control has prefixed pseudo-elements. Though controlling turns off default.<br>
&lt;dael> TabAtkins: My concern is if we add these range inputs won't be sufficently styleable. That's my only concern<br>
&lt;dael> masonfreed_: I don't disagree. Perhaps that future improvement<br>
&lt;dael> TabAtkins: I'm happy with this and works for other control. I support pursuing and see if we can solve range<br>
&lt;dael> astearns: I wanted to voice concern that these are vauge in application where UAs decide how to apply them. Understand form controls are impl differently. May not be initially ways of making this interop apply<br>
&lt;jensimmons> q+<br>
&lt;dael> astearns: Do you think that's set in stone or is making these colors available and seeing differences sparking further interop in form controls?<br>
&lt;astearns> ack astearns<br>
&lt;dael> masonfreed_: This isn't a fix for complete interop. It's a good project which is being persued. I see this as currently form controls are not interop at all. Causes many problems. Adding this mandate (since it's not well spec)....currently colors are out of control of authors. It moves us in direction of interop since there is more dev guidance in the impl.<br>
&lt;dael> astearns: Yeah. Wanted to make sure not painting into a corner. This isn't perm bandaid and allows things to heal underneath<br>
&lt;astearns> ack myles<br>
&lt;dael> masonfreed_: Completely agree.<br>
&lt;dael> myles: A few minutes ago they said chrome switch from gray to blue caused problems. Surprising that a browser made a change which caused problems and fix is adding css properties. Some thought to maybe that change to all websites in browser needs work<br>
&lt;dael> masonfreed_: I think this points to a current interop problem. Most of the complaints were around a color change to blue which existed in other browsers, incl chrome on Mac. To me what that means is they weren't testing on other platforms or browsers since it was already blue. Making this exposed would hopefully eliminate interop problems<br>
&lt;astearns> ack dbaron<br>
&lt;dael> dbaron: I do share some of astearns concerns. What I wanted to raise is when TabAtkins went through list of controls, esp range and progress. My understanding of desc is what is nominally foreground and background would we set to same for range. I think this pic shows they're the same blue.<br>
&lt;gregwhitworth> q+<br>
&lt;dael> dbaron: Risky in that one of the things we try and do in css is push that foreground and background should have contrast. We should avoid situation where we want them not to contrast. I'm worried about defining range in a way that fg and bg used but not contrasting<br>
&lt;florian> q+<br>
&lt;dael> masonfreed_: Two comments. In document I call out thumb being fg and filled in as bg. The screenshot there is chrome current impl which has no contrast. THat is very different across browsers. I think it calls out you want 2 colors so dev can choose different or identical. Spec 1 color and an algo to choose contrast precludes dev not wanting contrast<br>
&lt;dael> dbaron: In this case 3 colors on range. Question is which 2 can devs spec with fg and bg<br>
&lt;dael> masonfreed_: Agree. Ambig. That's the TabAtkins point range may need additional work. I don't think try and spec exactly which piece is fg and which bg. Point of study is what do these typically look like in order to have guidance. I don't thinkw e should spec all pieces now<br>
&lt;dael> dbaron: I think if you don't spec whatever first impl does everyone has to copy. I think better to spec and discuss.<br>
&lt;Rossen_> q?<br>
&lt;astearns> +1 to spec where we can rather than leaving ambiguities<br>
&lt;astearns> ack emilio<br>
&lt;dael> masonfreed_: I see point but I point to current form control which have been different for decades. I see point, it is possible. Long term is expand and spec all parts and allow complete style. I go back to this is a bandaid between now and when that's real<br>
&lt;dael> emilio: Point out dbaron point where this cannot be left out to whatever. We will have to copy 1st impl.<br>
&lt;dael> emilio: If I understand this is for native form controls, like appearance:auto. Right?<br>
&lt;dael> masonfreed_: Yes<br>
&lt;fantasai> Would like to note that locking down the exact UI of every form control on every device forever just because authors want to style them pixel perfectly on the devices they care about is not good for users.<br>
&lt;dael> emilio: Browsers don't always have control over those colors. Ex range on linux and mac for FF the control os drawn by the OS so this is not really impl right now. Want to move to a place where we may not have native styling, but right now couldn't impl<br>
&lt;dael> masonfreed_: Take your point. Until recently on Chrome checkboxes on mac not styled. That's more about why this should be guidance for impl<br>
&lt;dael> emilio: But then not useful to authors. What authors could do is say if browser supports I'll use it if not appearance:none. Not sure to what point authors would bother.<br>
&lt;dael> masonfreed_: Valid point.<br>
&lt;astearns> ack jensimmons<br>
&lt;Rossen_> Trying to align styling of form controls is not a new thing... certainly not new in terms of resolving against it, see<br>
&lt;dael> jensimmons: I want to say thank you for going and doing more research<br>
&lt;dael> jensimmons: I like seeing you figured out we need 2 properties. That's great,t hat's what we need.<br>
&lt;dael> jensimmons: As a front end dev the idea of these properties existing is super appealing. I can just universally or dark-mode/lightmode I can quickly change accent colors.<br>
&lt;dael> jensimmons: I think we believe there needs to be interop on this. I understand desire to do something quickly and not have to do deeper dive. Given reality of how tricky forms are in browsers it's a rats nest.<br>
&lt;dael> jensimmons: One of the things about how modern css is spec we learned the hard way what happens when underspec. form controls re bad b/c they were underspec a while ago. We can't repeat same mistake if we want to get out from under.<br>
&lt;dael> jensimmons: Feels like if these properties went to world without spec as to what part gets colors we wouldn't get same from all browsers and situation could get worse. THis shouldn't try and fix everything and I appiciate desire to do something quicker than openUI project.<br>
&lt;chrishtr> q+<br>
&lt;dael> jensimmons: I think right depth in technical debt is go through each thing and define exactly what is fg and bg. I don't know how to proceed without that. Doesn't have to be worst thing every, but make it clear that checkmark is fg and behind is bg. If browsers aren't same it's not useful<br>
&lt;dael> jensimmons: Whatever browser ships first defines it is what happened with css1 and 2 and then we end up stuck with things we can't ever change.<br>
&lt;dael> astearns: If we do run into scenario where people have to copy 1st impl it goes into spec, jsut too late.<br>
&lt;astearns> ack gregwhitworth<br>
&lt;dael> gregwhitworth: I wanted to say I feel like people are alluding. We left style out of openUI charter b/c we didn't think anyone would want to talk about interop styling. I think people overe there would be happy to say what gets fg and what's bg. We can take masonfreed_ work as an intial stab.<br>
&lt;dael> gregwhitworth: I went and looked at browsers and saw overlap...someone mentioned contrast...most component libraries do magic.<br>
&lt;dael> gregwhitworth: I'd like to involve openUI in standardizing. In addition we should provide that magic. Css1 we prevented all magic. We went the other way where we have no magic. I propose language where if you provide one browser does math to get contrast min so we get browsers able to do contrast<br>
&lt;TabAtkins> light/dark mode is a lot different from "here's two precise colors i need you to use"<br>
&lt;dael> gregwhitworth: Other argument where I'd like other browsers to weigh in on route we didn't nec do this for all browsers. We didn't go through all controls where if we're in dark this button gets a dark border. I'm getting some conflicts but happy to peel onion. I would love for us to be consistent if possible<br>
&lt;astearns> ack florian<br>
&lt;dael> florian: Conflicted. On one hand I agree with jensimmons and example where range sometimes they contrast and sometimes not and we should be deliberate and design. However, I don't believe we can. OSs not only have different colors but different structures. If you look at scrollbars they have differnet parts from now and 5 years ago. If form control looks completely different between browsers I don't see how we crack this. All while agreeing with jensimmons<br>
&lt;astearns> ack chrishtr<br>
&lt;dael> chrishtr: I don't think this would result in a disaster. Form controls being very different is a big problem. Id on't think this adds to problem but subtracts.<br>
&lt;dael> chrishtr: Addresses main problem that color scheme doesn't match.<br>
&lt;TabAtkins> I think the properties currently hit a good mix of specific and generic that'll be useful *and* future-safe. dbaron's concern about range fg/bg is the only one I'm really concerned about.<br>
&lt;dael> chrishtr: I think not a good idea to wait on complete solution b/c will take long time. Could be reasonable to try and approach where we write more specific suggestions in spec that state things like on checkbox rec that fg is the glyph.<br>
&lt;TabAtkins> (I think we might be able to address it by instead saying that Chrome *just* uses the fg color.)<br>
&lt;Rossen_> q-<br>
&lt;dael> chrishtr: Then bring it to the group and see if it's reasonable se of defaults for most browsers. Avoid problem of one browsers chooses and make it more collaborative.<br>
&lt;jensimmons> q?<br>
&lt;dael> astearns: Sounds like a good next step.<br>
&lt;astearns> ack fantasai<br>
&lt;Zakim> fantasai, you wanted to talk about variance of form control styling across OSes, e.g. drop-down boxes<br>
&lt;jensimmons> q+<br>
&lt;masonfreed_> I'm happy to take an action item to recommend the added spec recommendations suggested by chrishtr<br>
&lt;dael> fantasai: Same concerns as florian. I udnerstand problem we want to solve. Concern about idea that goal is make form controls unified for now and in future. Lots of improvements to form controls over time. I think it would be a little bit inappropriate to say now is the best form of UI. I don't want to lock into where we spec exactly what form controls look like and in 5 years someone makes s new select box style that's not compat. That's my concern. No[CUT]<br>
&lt;TabAtkins> That's also my concern, fwiw, and I think this proposal specifically does *not* run into that.<br>
&lt;astearns> ack jensimmons<br>
&lt;masonfreed_> q+<br>
&lt;dael> jensimmons: I think we have a lot of agreement. We don't want to overcontrol form controls b/c it needs to be possible to invent new display. We know defaults are different for very good reasons. There's a happy medium. What chrishtr said is right taht limit to what we can spec, but we should go down the road. Use lots of may<br>
&lt;dael> jensimmons: As we add accent-color-fg and -bg I can see not spec the defaults. There's threading hte needle. I think everyone is saying thigns that are true. We want to keep this scoped and tight so it doesn't take forever but not create bigger problems.<br>
&lt;fantasai> For the minutes, the proposal gdoc is archived at<br>
&lt;astearns> ack masonfreed_<br>
&lt;dael> masonfreed_: Echoing. This will be hard to spec crisply, but want to avoid 1st impl wins. I like chrishtr suggestion for more guidance we can agree on before it's implemented. Happy tot ake that action and propose new text.<br>
&lt;dael> astearns: Thank you and thanks for the work.<br>
&lt;dael> astearns: Out of time. Everything we didn't get to goes on the agenda next week<br>

GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at using your GitHub account

Received on Wednesday, 22 July 2020 16:59:41 UTC