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

fix(input): adjust colors, padding, fonts & heights for ionic theme #29520

Merged
merged 10 commits into from
May 22, 2024

Conversation

brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented May 17, 2024

Issue number: internal


What is the current behavior?

Input styles were slightly different from the ionic theme design.

What is the new behavior?

Updates the following:

  • The font size for input (14px) and labels (12px)
  • The font weight, line-height and color for the label
  • The padding for the label & helper message
  • Removes the label transform in order to set font-size directly
  • Updates the Sass variables to be referenced from tokens where they were not

Does this introduce a breaking change?

  • Yes
  • No

Other information

The underline (undefined) fill looks off from the design but issue ROU-5151 exists for implementing it so I assume it will be fixed there.

Image Comparison

Before After UX Design
ionic-before ionic-after UX design

Note

The design is not going to match perfectly because we are not using the Inter font in our tests.

Copy link

vercel bot commented May 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 17, 2024 8:29pm

}

:host(.label-floating) .label-text-wrapper {
@include transform(none);
Copy link
Member Author

Choose a reason for hiding this comment

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

By removing this transform we are able to set the font-size directly instead of scaling it down from the :host font size.

* Label text should not extend
* beyond the bounds of the input.
*/
max-width: calc((100% - var(--padding-start) - var(--padding-end)) / #{$form-control-label-stacked-scale});
Copy link
Member Author

Choose a reason for hiding this comment

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

This is no longer needed without the transform as a rule already exists to set the max-width here:

max-width: calc(100% - var(--padding-start) - var(--padding-end));

@brandyscarney brandyscarney marked this pull request as ready for review May 17, 2024 20:28
@brandyscarney brandyscarney requested a review from a team as a code owner May 17, 2024 20:28
@brandyscarney brandyscarney requested review from thetaPC and removed request for a team May 17, 2024 20:28
Copy link
Contributor

@thetaPC thetaPC left a comment

Choose a reason for hiding this comment

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

LGTM, verified with Figma too

@brandyscarney brandyscarney changed the title fix(input): adjust colors, padding & heights to match design for ionic theme fix(input): adjust colors, padding, fonts & heights for ionic theme May 22, 2024
@brandyscarney brandyscarney merged commit 7a4843b into ROU-4848 May 22, 2024
47 checks passed
@brandyscarney brandyscarney deleted the fix-input-placeholder branch May 22, 2024 15:58
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.

None yet

2 participants