Skip to content

feat(themes): remove deprecated color steps and update bg and text steps#31035

Open
thetaPC wants to merge 3 commits intoionic-modularfrom
FW-6751-pt3
Open

feat(themes): remove deprecated color steps and update bg and text steps#31035
thetaPC wants to merge 3 commits intoionic-modularfrom
FW-6751-pt3

Conversation

@thetaPC
Copy link
Contributor

@thetaPC thetaPC commented Mar 24, 2026

Issue number: internal


What is the current behavior?

Code still references the deprecated color steps.

What is the new behavior?

  • Removed the color steps
  • Upgraded the stepped test page to view the background steps and text steps easier.
  • Added a function to generate the stepped colors

Does this introduce a breaking change?

  • Yes
  • No
  • The deprecated color step CSS variables, --ion-color-step-[number], have been removed and should be replaced with either --ion-background-color-step-[number] or --ion-text-color-step-[number] depending on the specific use case, as outlined in the migration guide.

Other information

Preview

@vercel
Copy link

vercel bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ionic-framework Ready Ready Preview, Comment Mar 24, 2026 11:02pm

Request Review

@github-actions github-actions bot added package: core @ionic/core package package: angular @ionic/angular package package: react @ionic/react package labels Mar 24, 2026
@thetaPC thetaPC changed the title feat(themes): remove deprecated color steps feat(themes): remove deprecated color steps and update bg and text stepped colors Mar 24, 2026
@thetaPC thetaPC changed the title feat(themes): remove deprecated color steps and update bg and text stepped colors feat(themes): remove deprecated color steps and update bg and text steps Mar 24, 2026
@thetaPC thetaPC marked this pull request as ready for review March 24, 2026 23:15
@thetaPC thetaPC requested a review from a team as a code owner March 24, 2026 23:15
@thetaPC thetaPC requested review from BenOsodrac and brandyscarney and removed request for BenOsodrac March 24, 2026 23:15
--ion-background-color-step-850: #d9d9d9;
--ion-background-color-step-900: #e6e6e6;
--ion-background-color-step-950: #f2f2f2;

Copy link
Member

Choose a reason for hiding this comment

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

Don't we need to add the --ion-text-color-step vars here too?

--ion-background-color-step-850: #d9d9d9;
--ion-background-color-step-900: #e6e6e6;
--ion-background-color-step-950: #f2f2f2;

Copy link
Member

Choose a reason for hiding this comment

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

Don't we need to add the --ion-text-color-step vars here too?

--ion-background-color-step-900: #e8eaeb;
--ion-background-color-step-950: #f4f4f5;
--ion-background-color-step-1000: #fff;
}
Copy link
Member

Choose a reason for hiding this comment

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

Don't we need to add the --ion-text-color-step vars here too?

--ion-background-color-step-850: #dbdbdb;
--ion-background-color-step-900: #e7e7e7;
--ion-background-color-step-950: #f3f3f3;

Copy link
Member

Choose a reason for hiding this comment

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

Don't we need to add the --ion-text-color-step vars here too?

--ion-background-color-step-850: #d9d9d9;
--ion-background-color-step-900: #e6e6e6;
--ion-background-color-step-950: #f2f2f2;

Copy link
Member

Choose a reason for hiding this comment

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

Don't we need to add the --ion-text-color-step vars here too?

--ion-color-step-50,
var(--ion-text-color-step-950, mix($background-color-value, $text-color-value, 95%))
);
$background-color-step-50: var(--ion-background-color-step-50, mix($text-color-value, $background-color-value, 5%));
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 consider moving these to the default tokens file instead and just having the Sass files use the tokens directly instead of Sass variables. Doesn't have to be done on this PR though.

backgroundColor: '#ffffff',
textColor: '#000000',

backgroundColorStep: {
Copy link
Member

Choose a reason for hiding this comment

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

Why was this removed entirely?

Comment on lines +15 to +16
backgroundColorStep: generateColorSteps('#ffffff', '#121212'),
textColorStep: generateColorSteps('#888888', '#ffffff'),
Copy link
Member

Choose a reason for hiding this comment

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

These values are not right. The values are flipped for the dark palette.

export const highContrastTheme: HighContrastTheme = {
...baseHighContrastTheme,

backgroundColor: '#ffffff',
Copy link
Member

Choose a reason for hiding this comment

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

Why was this removed entirely?

Copy link
Member

Choose a reason for hiding this comment

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

Like my earlier comment - we should consider making these always available for every theme and palette.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: angular @ionic/angular package package: core @ionic/core package package: react @ionic/react package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants