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

[Input] - Double opacity applied to disabled inputs #5283

Closed
levithomason opened this issue Apr 17, 2017 · 2 comments
Closed

[Input] - Double opacity applied to disabled inputs #5283

levithomason opened this issue Apr 17, 2017 · 2 comments

Comments

@levithomason
Copy link
Member

Steps to Reproduce

  1. Create a .ui.disabled.input with an input[disabled] child.

Expected
The input should have an opacity rule applied to appear disabled.

Result
The input has two opacity rules applied and is hardly visible. This is because the .ui.disabled.input wrapper receives opacity: 0.4 while the .ui.input input[disabled] child also receives opacity: 0.4. The result is an input element with an effective opacity of 0.16.

Testcase

http://jsfiddle.net/ebecpcLp/2/

image

Fix

The input element should only have opacity applied if the wrapper is not already also disabled:

input.less

.ui.disabled.input,
-.ui.input input[disabled] {
+.ui.input:not(.disabled) input[disabled] {
  opacity: @disabledOpacity;
}
@arntj
Copy link

arntj commented Jul 1, 2017

What's the status on this one?

@levithomason
Copy link
Member Author

Fixed in ae38450

@awgv awgv removed this from the Needs Milestone milestone Sep 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants