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

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

From: Mason Freed via GitHub <sysbot+gh@w3.org>
Date: Sun, 02 Aug 2020 18:21:52 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-667707949-1596392511-sysbot+gh@w3.org>
> Without diving into the specific of which color is used where, I feel you're on the right path in term of how this should be specified.

Glad you think so! I'd be really interested to hear specific per-control feedback, as I think this process (haggling over each one) might take some time, but it's important to the spec here.

> One comment though. Earlier, you said:
> 
> > The first provided color would be the "foreground" color, the second is the "background"
> 
> It seems to me you actually took the opposite approach, and that this leads you in many example to use "auto" as the first color, since it wouldn't show up anyway in various controls which don't use a background color. Can you comment on this?

Yes. This took some thought (and again, some good feedback from @heycam) to push me toward the current proposal. The basic insight was that the critical "color-matching" accent part should always be the first one. It would be really nice if an author could use `accent-color: blue` and then the most "visible" or "page-matching" elements would turn blue, while any other elements (e.g. glyphs) would automatically provide contrast. In most cases, the "primary" element turned out to be the element I had previously been calling "background". So I reversed the order, and renamed them to be a bit less specific to where it is (foreground or background) and more specific to whether it is the primary accent or just something that needs contrast.

As for the examples I provided, I just wanted to show a number of different scenarios. I don't think many of these would be typical, and as you can see from the color choices I made, I'm definitely not a designer. However, if you believe I got one (or many!) of the controls backwards, and you think the "primary/contrasting" elements should be swapped, that's great feedback to have.

**It would be great to get some developer input on this proposal**, in particular the ergonomics of "primary" vs. "contrasting" and the order of the two. It would also be good to get input on whether there is a need to provide the "contrasting" color at all, or if it would be good enough to just control the "primary" color and always leave the contrasting elements to the UA. Personally, I think we should be pushing to open access to all of the colors being used on each control, but there is overhead and complexity to doing that.

-- 
GitHub Notification of comment by mfreed7
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5187#issuecomment-667707949 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 2 August 2020 18:21:54 UTC

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