Repository navigation
fix(input): update disabled opacity of md input - #26514
Conversation
| :host(.legacy-input) .native-input[disabled], | ||
| :host([disabled]) { | ||
| opacity: 0.4; | ||
| opacity: #{$input-disabled-opacity}; |
There was a problem hiding this comment.
Do we need to make this change for ion-textarea?
There was a problem hiding this comment.
Yes 🙂 that is part of my v7 changes (active work), so you'll see a separate PR to track that change.
Edit:
I wanted to make sure we approved of this change/approach/etc. for input before tackling it for textarea.
| /// This value comes from the Material Design spec: | ||
| /// - https://github.com/material-components/material-web/pull/549 | ||
| /// We apply the same value to both iOS and MD themes. | ||
| $input-disabled-opacity: 0.37 !default; |
There was a problem hiding this comment.
I'm fine with converging on one opacity. The difference between 0.4 and 0.37 is so small that it likely will not have a noticeable impact on apps. However, the only reason I decided to converge on $input-floating-label-scale for both iOS and MD is that iOS has no concept of a floating label, so we are free to pick a reasonable default. This is not the case with a disabled text field as this pattern appears on iOS. I'd prefer we only converge on patterns when no pattern exists for a certain platform and we need to create one.
|
Updated this PR so that it only changes the disabled opacity for MD and leaves iOS as it is today. This allows us to match the MD spec without forcing the MD standard on the iOS appearance. |
Pull request checklist
Please check if your PR fulfills the following requirements:
ionic-docsrepo, in a separate PR. See the contributing guide for details.npm run build) was run locally and any changes were pushednpm run lint) has passed locally and any fixes were made for failuresPull request type
Please check the type of change your PR introduces:
What is the current behavior?
The disabled opacity for the label and input is
0.4for MD.Issue URL: N/A
What is the new behavior?
0.37for MD (aligning with MD spec).Does this introduce a breaking change?
Other information