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

feat(css): add support for the subtle color map #30306

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

Conversation

brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Mar 26, 2025

Issue number: internal


What is the current behavior?

The colors are only available in bold colors.

What is the new behavior?

Adds support for a subtle hue to the colors map, generating all of the same variants but in more subtle colors. This only applies for the ionic theme. Adds an additional variant, foreground to be used by components when the color is being used for text.

Does this introduce a breaking change?

  • Yes
  • No

No changes are made to the existing colors.

Other information

Preview

Copy link

vercel bot commented Mar 26, 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 Apr 4, 2025 8:03pm

),
// neutral/base equivalent
light:
Copy link
Member Author

Choose a reason for hiding this comment

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

I think we should probably make light use a lighter version but I am not sure

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at the Colors page, I think is already light enough and different form Medium and Dark, I'm ok with this :)

contrast-rgb: globals.$ion-text-default-rgb,
// TODO this fails AA testing
// shade: globals.$ion-bg-neutral-base-press,
shade: globals.$ion-primitives-neutral-600,
Copy link
Member Author

Choose a reason for hiding this comment

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

The 600 token is one step lighter but it fails AA with default text

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe use --ion-color-dark-subtle-contrast or --ion-bg-neutral-bold-press?

Copy link
Member Author

Choose a reason for hiding this comment

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

The bg-neutral-bold-press token is too dark for this, it uses #242424 compared to the current token I am using #8c8c8c. I couldn't find any tokens with “dark” in their name. The issue is the light color is using the default (black) text so the pressed state can't be too dark to not fail the contrast check.

@brandyscarney brandyscarney marked this pull request as ready for review April 3, 2025 20:44
@brandyscarney brandyscarney requested a review from a team as a code owner April 3, 2025 20:44
@brandyscarney brandyscarney requested review from christian-bromann and BenOsodrac and removed request for christian-bromann April 3, 2025 20:44
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.

3 participants