Skip to content

fix(item): form validation caret color renders correctly - #25725

Merged
liamdebeasi merged 6 commits into
mainfrom
FW-1975
Aug 10, 2022
Merged

fix(item): form validation caret color renders correctly#25725
liamdebeasi merged 6 commits into
mainfrom
FW-1975

Conversation

@liamdebeasi

@liamdebeasi liamdebeasi commented Aug 5, 2022

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?

Issue URL: resolves #25719

When simplifying the code for the input highlights/caret color in 5ca2ce9, I accidentally made the caret color apply to both iOS and MD modes. This behavior was added to align with the MD spec (https://material.io/components/text-fields), so it should only be available on MD mode.

Additionally, the usage of --highlight-color-focused was incorrect. We should use --highlight-background as the value of that will be set to --highlight-color-focused when the input is focused. In other words, we don't need to reference the var directly.

What is the new behavior?

  • Caret color correction applies on MD mode only
  • Removed the unnecessary highlight-color-focused reference. Note: There should be no noticeable change here because the code in item.scss was always overriding the incorrect code in item.md.scss.

Does this introduce a breaking change?

  • Yes
  • No

Other information

@github-actions github-actions Bot added the package: core @ionic/core package label Aug 5, 2022
@liamdebeasi
liamdebeasi marked this pull request as ready for review August 5, 2022 15:56
@liamdebeasi
liamdebeasi requested a review from a team August 5, 2022 15:56
</ion-col>
<ion-col>
<ion-item class="ion-invalid" fill="solid">
<ion-item class="ion-valid" fill="solid">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed there were no "valid" examples, so I changed extra invalid examples to show valid examples

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.

bug: caret color for inputs should only be applied on md mode

3 participants