Skip to content

fix(textarea): update disabled opacity of md textarea - #26893

Closed
sean-perkins wants to merge 7 commits into
mainfrom
fix/textarea-disabled-opacity
Closed

sean-perkins wants to merge 7 commits into
mainfrom
fix/textarea-disabled-opacity

Conversation

@sean-perkins

Copy link
Copy Markdown
Contributor

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
    • Some docs updates need to be made in the ionic-docs repo, in a separate PR. See the contributing guide for details.
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

The disabled opacity for the label and textarea is 0.4 for MD.

Issue URL: N/A

What is the new behavior?

  • The disabled opacity for the label and textarea is 0.37 for MD (aligning with MD spec).

Does this introduce a breaking change?

  • Yes
  • No

Other information

Blocked by: #26892

Similar work as: #26514

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions Bot added the package: core @ionic/core package label Mar 1, 2023
Base automatically changed from feature-7.0 to main March 30, 2023 16:16
@brandyscarney

Copy link
Copy Markdown
Member

I don't think this value is correct. I actually changed the input one back in this PR: https://github.com/ionic-team/ionic-framework/pull/27396/files#diff-3c619db824e59bf2c818ab887e0c0fffe77dd6238239d1e40c3fde865310d4e7R76

The reason I changed it in my PR is because this is what is in the Material Design 2 documentation: https://m2.material.io/components/text-fields#outlined-text-field

If you use a color dropper over the disabled label it will be #999999 (or close to it, depending on where the hover is at) which is the equivalent of rgb(0, 0, 0, 0.4). Using rgb(0, 0, 0, .37) gives us #A1A1A1. In the following images I am using Digital Color Meter on the disabled input field taken from the MD2 Outlined Text Field States section here and a box that has the fill set to #000 with 40% opacity (or rgb(0, 0, 0, 0.4).

Dropper over Input text Dropper over rgb(0, 0, 0, 0.4)
Screenshot_2023-05-10_at_12_36_25_PM Screenshot_2023-05-10_at_12_36_31_PM

I am not sure where they got 0.37 from, because the Material Design 1 spec uses 0.38:

Screenshot 2023-05-10 at 12 47 27 PM

In addition, that file in the PR you are referencing no longer exists, but from what I can find here their code does use 0.38:

I also see 0.38 being used in the material-components-web repo:

It's hard to tell what to follow since the Material Design 2 kit doesn't show disabled inputs, but I think we should either follow what is used in the Material Design 2 spec or future-proof by following Material Design 3.

The Material Design 3 kit uses 0.38 as an opacity, although it uses a different font color (#1D1B20). I think we should use 0.4 if we want to follow Material Design 2 spec or we should use 0.38 if we want to avoid changing this again for MD3.

@sean-perkins

Copy link
Copy Markdown
Contributor Author

Closing this PR in favor of: #27396

@sean-perkins
sean-perkins deleted the fix/textarea-disabled-opacity branch May 16, 2023 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants