Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(themes): enable all palettes#30874

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
thetaPC wants to merge7 commits intoionic-modular
base:ionic-modular
Choose a base branch
Loading
fromset-content
Open

Conversation

@thetaPC
Copy link
Contributor

@thetaPCthetaPC commentedDec 15, 2025
edited
Loading

Issue number: internal


What is the current behavior?

The new theming structure does not allow high contrast and high contrast dark to render properly. This can be seen when running a test that usesset-content.

What is the new behavior?

  • High contrast and high contrast dark have been enabled to the testing environments
  • The theme files for high contrast and high contrast dark have been added underthemes.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Colors preview

How to test:

  1. Verify that tests related to palettes are passing especially those that usesetContent
  2. Verify that the preview page renders the right colors for each possible variation of palettes and themes

@vercel
Copy link

vercelbot commentedDec 15, 2025
edited
Loading

The latest updates on your projects. Learn more aboutVercel for GitHub.

ProjectDeploymentReviewUpdated (UTC)
ionic-frameworkReadyReadyPreview,CommentDec 16, 2025 3:50am

@github-actionsgithub-actionsbot added the package: core@ionic/core package labelDec 15, 2025
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

The difference is the text color. The old version is showing#1f1f1f and the updated version is showing#000. The text color was not being displayed correctly until I updated theset-content file. If you compare the text color tonext then you can verify that it should be#000.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

The difference is the text color. The old version is showing#1f1f1f and the updated version is showing#000. The text color was not being displayed correctly until I updated theset-content file. If you compare the text color tonext then you can verify that it should be#000.

Comment on lines +129 to +137
// TODO(FW-4004): Implement dark mode
if(paletteName==='dark'&&theme.palette?.dark){
theme.palette.dark.enabled='always';
// TODO(FW-4005): Implement high contrast mode
}elseif(paletteName==='high-contrast'&&theme.palette?.highContrast){
theme.palette.highContrast.enabled='always';
// TODO(FW-4005): Implement high contrast dark mode
}elseif(paletteName==='high-contrast-dark'&&theme.palette?.highContrastDark){
theme.palette.highContrastDark.enabled='always';
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

We can decide at the time of dark and high contrast implementation if this order makes sense.

customTheme:{
palette:{
dark:{
enabled:'always',
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

This file is meant to be always be in dark mode as stated in the file path.

Comment on lines +12 to +15
// TODO(FW-6864): Remove once IonToolbar themes are added
toolbar:{
background:'#1f1f1f',
},
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Tests fail when--ion-toolbar-background is not set in certain cases likemd/dark. Since the goal of this PR is to enable the palettes, I didn't think create this variable under the components since as of now it would have rendered it as--ion-components-ion-toolbar-background. I would have had to either update the generate function to not add the--ion-components suffix or update all the--ion-toolbar-background to the new variable if I wanted to do it properly. That would have been outside of the scope so this approach was taken along with adding a TODO to come back.

Comment on lines +10 to +13
// TODO(FW-6864): Remove once IonToolbar themes are added
toolbar:{
background:'#1f1f1f',
},
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Tests fail when--ion-toolbar-background is not set in certain cases likemd/dark. Since the goal of this PR is to enable the palettes, I didn't think create this variable under the components since as of now it would have rendered it as--ion-components-ion-toolbar-background. I would have had to either update the generate function to not add the--ion-components suffix or update all the--ion-toolbar-background to the new variable if I wanted to do it properly. That would have been outside of the scope so this approach was taken along with adding a TODO to come back.

Comment on lines +20 to +22
// TODO(FW-6864): Remove once IonToolbar themes are added
toolbar?:any;

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Tests fail when--ion-toolbar-background is not set in certain cases likemd/dark. Since the goal of this PR is to enable the palettes, I didn't think create this variable under the components since as of now it would have rendered it as--ion-components-ion-toolbar-background. I would have had to either update the generate function to not add the--ion-components suffix or update all the--ion-toolbar-background to the new variable if I wanted to do it properly. That would have been outside of the scope so this approach was taken along with adding a TODO to come back.

({ title, config, screenshot})=>{
test.describe(title('toast: high contrast: buttons'),()=>{
// TODO(FW-4005): Once high contrast themes are fully implemented in ionic modular, remove the skips from these tests
test.describe.skip(title('toast: high contrast: buttons'),()=>{
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

This test fails because there arecertain styles that are not available for toast. The point of this PR is to enable the palettes to work within tests and to not meddle with any components. Those styles should be reworked when we are fully implementing high contrast into the new theming structure.

@thetaPCthetaPC marked this pull request as ready for reviewDecember 16, 2025 04:16
@thetaPCthetaPC requested a review froma team as acode ownerDecember 16, 2025 04:16
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@brandyscarneybrandyscarneyAwaiting requested review from brandyscarneybrandyscarney is a code owner automatically assigned from ionic-team/framework

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

package: core@ionic/core package

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@thetaPC@Ionitron

[8]ページ先頭

©2009-2025 Movatter.jp