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

refactor(toast): use the correct step color tokens for background and text #28928

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Jan 30, 2024

Issue number: internal


What is the current behavior?

The toast container background and toast text color were using the following:

/// @prop - Background of the toast
$toast-md-background: $text-color-step-200 !default;

/// @prop - Color of the toast
$toast-md-color: $background-color-step-50 !default;

Which evaluated to:

:host {
  --background: var(--ion-color-step-800, var(--ion-text-color-step-200, #333333));
  --color: var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));
}

What is the new behavior?

The variables have been updated so that the background variable is used for the background of the toast container and the text variable is used for the text color of the toast:

/// @prop - Background of the toast
$toast-md-background: $background-color-step-800 !default;

/// @prop - Color of the toast
$toast-md-color: $text-color-step-950 !default;

This evaluates to:

:host {
  --background: var(--ion-color-step-800, var(--ion-background-color-step-800, #333333));
  --color: var(--ion-color-step-50, var(--ion-text-color-step-950, #f2f2f2));
}

Does this introduce a breaking change?

  • Yes
  • No

There are no breaking changes as the --ion-color-step-* variables being used are the same, and the --ion-background-color-step-* and --ion-text-color-step-* have not been released yet. The fallback colors when both variables are undefined have also not changed.

Other information

No visual diffs are expected.

@github-actions github-actions bot added the package: core @ionic/core package label Jan 30, 2024
@brandyscarney brandyscarney marked this pull request as ready for review January 30, 2024 22:29
@brandyscarney brandyscarney requested a review from a team as a code owner January 30, 2024 22:29
@brandyscarney brandyscarney requested review from thetaPC and removed request for a team January 30, 2024 22:29
@brandyscarney brandyscarney changed the title fix(toast): use the correct step color tokens for background and text refactor(toast): use the correct step color tokens for background and text Jan 30, 2024
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

@brandyscarney brandyscarney merged commit e49abc5 into FW-5747 Jan 31, 2024
44 checks passed
@brandyscarney brandyscarney deleted the FW-5832 branch January 31, 2024 15:17
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