Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-color-adjust-1] Why special-casing background-image for inputs? #4917

Closed
emilio opened this issue Apr 2, 2020 · 5 comments
Closed

[css-color-adjust-1] Why special-casing background-image for inputs? #4917

emilio opened this issue Apr 2, 2020 · 5 comments
Labels

Comments

@emilio
Copy link
Collaborator

emilio commented Apr 2, 2020

https://drafts.csswg.org/css-color-adjust-1/#forced-colors-properties has a somewhat odd condition:

Additionally, on on user input controls (except button-like controls) only, background-image.

Two questions:

  • Why special-casing input / textareas? I've never seen a textarea styled with background-image so I'm actually surprised that this special-casing is necessary.

  • If it is necessary, that sentence seems a bit ill-defined. Is <input type=color> a button-like control? What about <select>?

cc @atanassov

@emilio emilio added the css-color-adjust-1 Current Work label Apr 2, 2020
@alisonmaher
Copy link
Collaborator

@emilio I believe this was a remnant of Legacy Microsoft Edge behavior. I agree that this shouldn't be necessary, especially with the backplate feature, and I would support removing this from the spec.

@atanassov atanassov added Agenda+ and removed Agenda+ labels May 18, 2020
@fantasai
Copy link
Collaborator

fantasai commented May 19, 2020

Why special-casing input / textareas?

We inherited this from Microsoft's definition, so that's a question for @atanassov and @melanierichards :)

If it is necessary, that sentence seems a bit ill-defined. Is <input type=color> a button-like control? What about <select>?

It's ill-defined because appropriate behavior can vary by platform. CSS/HTML doesn't define what controls "look like" buttons, but that's intended the criteria here...

@atanassov
Copy link
Contributor

We actually don't need this behavior given that the backplate is now covering all of these scenarios. I recommend removing the text from the spec and closing this issue.

@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed Why special-casing background-image for inputs?, and agreed to the following:

  • RESOLVED: Remove the special case of background images on input elements wrt forced colors
The full IRC log of that discussion <heycam> Topic: Why special-casing background-image for inputs?
<heycam> github: https://github.com//issues/4917
<heycam> Rossen_: this issue is calling out some special casing that was added for bg images on input elements
<heycam> ... for the purposes of forced colors
<heycam> ... and this was a legacy behavior that was carried forward over the years and not really necessary any more
<heycam> ... since we have the backplate, which is used to guarantee contrast where needed
<heycam> ... just commented earlier on the issue earlier, I'm completely fine with removing it from the spec and closing the issue
<heycam> ... unless anyone has any reason why we shouldn't
<heycam> ... any objections to removing the special casing and closing the issue?
<heycam> RESOLVED: Remove the special case of background images on input elements wrt forced colors
<TabAtkins> i'm fine with moving to inline issues
<fantasai> https://github.com//issues/3199#issuecomment-634368358

@alisonmaher
Copy link
Collaborator

Resolved by the WG and PR landed. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants