Skip to content

feat(input): add styles for ionic theme for fill=solid #30417

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

Open
wants to merge 11 commits into
base: next
Choose a base branch
from

Conversation

JoaoFerreira-FrontEnd
Copy link
Contributor

@JoaoFerreira-FrontEnd JoaoFerreira-FrontEnd commented May 19, 2025

Issue number: Internal


What is the new behavior?

  • add fill solid to ionic theme input;
  • move input.outline.scss to input.ionic.scss;
  • add fill solid to states page;
  • remove highlight styles for ionic theme;
  • add tests for ionic solid input;

Does this introduce a breaking change?

  • Yes
  • No

Other information

Copy link

vercel bot commented May 19, 2025

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 22, 2025 3:46pm

@github-actions github-actions bot added the package: core @ionic/core package label May 19, 2025
Copy link
Member

@brandyscarney brandyscarney left a comment

Choose a reason for hiding this comment

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

Looks good just a few requested changes on where styles are applied!

Copy link
Member

Choose a reason for hiding this comment

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

Why are we deleting this file but adding a solid one? Can't we keep both and default the fill styles to input-fill-outline?

@@ -1,26 +1,127 @@
@use "../../themes/ionic/ionic.globals.scss" as globals;
@use "./input.common";
@forward "./input.ionic.outline.scss";

@forward "./input.ionic.solid.scss";
// Ionic Input
// --------------------------------------------------

:host {
--color: #{globals.$ion-primitives-neutral-1200};
--border-width: #{globals.$ion-border-size-025};
Copy link
Member

Choose a reason for hiding this comment

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

We should move all styles specific to fill to the input-fill-outline class like we do for button:

This will make it so that in the future if we need to change the default fill we don't have to move the styles around.

// Ionic Input
// --------------------------------------------------

:host {
--color: #{globals.$ion-primitives-neutral-1200};
--border-width: #{globals.$ion-border-size-025};
--border-color: #{globals.$ion-primitives-neutral-500};
--border-radius: #{globals.$ion-border-radius-100};
Copy link
Member

Choose a reason for hiding this comment

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

Similarly, can we move all styles specific to shape to the shape class such as input-fill-round so that if we change the default we don't have to move styles?

// Ionic Input
// --------------------------------------------------

:host {
--color: #{globals.$ion-primitives-neutral-1200};
--border-width: #{globals.$ion-border-size-025};
--border-color: #{globals.$ion-primitives-neutral-500};
--border-radius: #{globals.$ion-border-radius-100};
Copy link
Member

Choose a reason for hiding this comment

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

Where is this value coming from? In Figma I see the following:

round -> round.xl -> 16px -> $ion-round-xl ($ion-border-radius-400 -> $ion-scale-400: var(--ion-scale-400, 16px);)
soft -> soft.xl -> 8px -> $ion-soft-xl ($ion-border-radius-200 -> $ion-scale-200: var(--ion-scale-200, 8px);)
rectangular -> rectangular.xl -> 0px -> $ion-rectangular-xl ($ion-border-radius-0 -> $ion-scale-0: var(--ion-scale-0, 0px);)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was from here, I can delete it, but it's possible to have an undefined shape when in ionic theme here

Copy link
Member

Choose a reason for hiding this comment

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

The undefined shape is only when it isn't the ionic theme:

Screenshot 2025-05-22 at 2 04 01 PM

Comment on lines 14 to 15
--padding-start: #{globals.$ion-space-300};
--padding-end: #{globals.$ion-space-300};
Copy link
Member

Choose a reason for hiding this comment

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

This seems to only apply for the small size - can we move this to .input-size-small?

// --------------------------------------------------

:host(.input-shape-soft) {
--border-radius: #{globals.$ion-border-radius-200};
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
--border-radius: #{globals.$ion-border-radius-200};
--border-radius: #{globals.$ion-soft-xl};

This would match Figma

}

:host(.input-shape-round) {
--border-radius: #{globals.$ion-border-radius-400};
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
--border-radius: #{globals.$ion-border-radius-400};
--border-radius: #{globals.$ion-round-xl};

This would match Figma

}

:host(.input-shape-rectangular) {
--border-radius: #{globals.$ion-border-radius-0};
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
--border-radius: #{globals.$ion-border-radius-0};
--border-radius: #{globals.$ion-rectangular-xl};

This would match Figma

- specify attributes by classes type;
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