Skip to content

Conversation

@brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Sep 23, 2025

Issue number: internal


What is the current behavior?

The colors are generated using the Sass functions and a $colors map and the design tokens are undefined.

What is the new behavior?

  • Moves the helper & theme spec tests into the test directory with the other ones
  • Defines base tokens for the default, light & dark tokens
  • Defines the interfaces for the different theme objects
  • Adds new theme utility functions to mix colors together (used for shade & tint) and convert hex to rgb
  • Updates the functions that generate the design token variables to:
    • Automatically generate the rgb variables without needing to set them manually
    • Create the color classes (.ion-color-primary, .ion-color-secondary, etc.) which are used by the components to change their color via the color property
  • Adds 3 e2e tests to verify visually that the design tokens are generating properly: Basic, Color & Typography
  • Removes the old Sass mixins/functions & updates the ones we still need to pull from the design tokens instead of the $colors map

Does this introduce a breaking change?

  • Yes
  • No

This adds foreground as a required variant to the colors now. Currently foreground is only used by clear buttons but it should be used by all text-only components. This will break for any apps overriding --ion-color-primary without --ion-color-primary-foreground. We will have to look into improving the migration path on this later.

Other information

@vercel
Copy link

vercel bot commented Sep 23, 2025

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

Project Deployment Preview Comments Updated (UTC)
ionic-framework Ready Ready Preview Comment Oct 1, 2025 3:42pm

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

Copy link
Member

@ShaneK ShaneK left a comment

Choose a reason for hiding this comment

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

Looking really good! Great work!

@brandyscarney brandyscarney merged commit 41953b0 into ionic-modular Oct 1, 2025
50 checks passed
@brandyscarney brandyscarney deleted the FW-6748 branch October 1, 2025 16:13
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