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

The color for disabled SELECT is different from INPUT TYPE=TEXT and TEXTAREA #33089

Closed
rmacfadyen opened this issue Feb 15, 2021 · 5 comments · Fixed by #33127
Closed

The color for disabled SELECT is different from INPUT TYPE=TEXT and TEXTAREA #33089

rmacfadyen opened this issue Feb 15, 2021 · 5 comments · Fixed by #33127

Comments

@rmacfadyen
Copy link

rmacfadyen commented Feb 15, 2021

OS: win10
Browser: chrome 88, firefox 85, opera 73, edge 88

Repo: js fiddle

Picture of the bug in action: picture

The class form-select defines color and background color different from the class form-control. They should be the same.

In v4 a SELECT did not have a specific form-XYZ class of it's own, just form-control. In v5 a SELECT does have a specific form-select class.

@rmacfadyen rmacfadyen changed the title The background-color and color for disabled SELECT is different from INPUT TYPE=TEXT and TEXTAREA v5 css The background-color and color for disabled SELECT is different from INPUT TYPE=TEXT and TEXTAREA Feb 15, 2021
@rmacfadyen rmacfadyen changed the title v5 css The background-color and color for disabled SELECT is different from INPUT TYPE=TEXT and TEXTAREA v5 beta3 The background-color and color for disabled SELECT is different from INPUT TYPE=TEXT and TEXTAREA Feb 15, 2021
@ffoodd
Copy link
Member

ffoodd commented Feb 15, 2021

From your own fiddle, background-color is the same but not color, indeed: @mdo should we use .form-select:disabled color for other inputs, or simply drop it?

From an accessibility perspective, I'd go with two since it has better contrasts. If we go the other way, current disabled select is only 3.95:1, could easily be increased to pass 4.5:1 :)

@rmacfadyen rmacfadyen changed the title v5 beta3 The background-color and color for disabled SELECT is different from INPUT TYPE=TEXT and TEXTAREA v5 beta3 The color for disabled SELECT is different from INPUT TYPE=TEXT and TEXTAREA Feb 15, 2021
@rmacfadyen rmacfadyen changed the title v5 beta3 The color for disabled SELECT is different from INPUT TYPE=TEXT and TEXTAREA The color for disabled SELECT is different from INPUT TYPE=TEXT and TEXTAREA Feb 15, 2021
@rmacfadyen
Copy link
Author

rmacfadyen commented Feb 16, 2021

@ffoodd I thought you were correct but decided to double check this morning :)

The backgrounds are not the same color. The INPUT TYPE=TEXT and TEXTAREA have a background color of #e9ecef, opacity 1. The SELECT also has a background color of #e9ecef, but its opacity is .7 from the agent style sheet (I only checked chrome).

The .form-control:disabled, .form-control[readonly] rules set the opacity to 1, but not the .form-select rules.

@ffoodd
Copy link
Member

ffoodd commented Feb 16, 2021

Yeah so background-color is the same. I didn't notice opacity differences but only checked in Firefox: maybe something to harmonize in our reboot, too.

@mdo
Copy link
Member

mdo commented Feb 16, 2021

This is unique to Chrome, so attaching it into Reboot. See #33127.

@mdo mdo added this to Inbox in v5.0.0-beta3 via automation Feb 16, 2021
@tkrotoff
Copy link
Sponsor Contributor

tkrotoff commented Feb 22, 2021

The issue is also present with Bootstrap v4.6.0: https://codepen.io/tkrotoff/pen/oNYGooP

Under Chrome 88 macOS, opacity problem:

image

Under Firefox 85, no opacity problem but the text color is wrong and misaligned:

image

Under Safari 13.1.2 there are also text color problems:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v5.0.0-beta3
  
Done
Development

Successfully merging a pull request may close this issue.

4 participants