Skip to content

Conversation

@thetaPC
Copy link
Contributor

@thetaPC thetaPC commented Sep 24, 2024

Issue number: resolves #


What is the current behavior?

What is the new behavior?

Does this introduce a breaking change?

  • Yes
  • No

Other information

@vercel
Copy link

vercel bot commented Sep 24, 2024

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 Sep 26, 2024 9:09pm

@github-actions github-actions bot added the package: core @ionic/core package label Sep 24, 2024

.input-bottom {
@include padding(7px, 0);
@include padding(globals.$ionic-space-100, 0);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

After adding the ionic theme file to the setContent, the snapshots were trying to add more spacing than expected. After investigating, I noticed that this no longer matched Figma.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With the new changes to Playwright, I realized that the color and font size were not being displayed correctly when using setContent. This was due to the lack of ion-content, ion-content would set these styles.

--padding-end: #{globals.$ionic-space-400};
--padding-bottom: #{globals.$ionic-space-200};
--padding-start: #{globals.$ionic-space-400};
--color: #{globals.$ionic-color-neutral-1200};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this color is close to black, the snapshots are going to look very similar.


:host {
--background: transparent;
--color: #{globals.$ionic-color-neutral-1200};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this color is close to black, the snapshots are going to look very similar.

}

:root.ionic {
--ionic-global-background-color: var(--background);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If ion-content is not present then the background will be changed to --ionic-global-background-color. The original value is a light brown, which leads to many snapshots needing to be re-generated. To avoid that, the variable is using the white color that comes from --background.

// --------------------------------------------------

:host {
--color: #{globals.$ionic-color-neutral-800};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated this to match Figma else it was trying to re-generate with black being the default value.

<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<link href="${baseUrl}/css/ionic.bundle.css" rel="stylesheet" />
${theme === 'ionic' ? `<link href="${baseUrl}/css/ionic/bundle.ionic.css" rel="stylesheet" />` : ''}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This matches the script that is being used in the test pages.

@thetaPC
Copy link
Contributor Author

thetaPC commented Sep 27, 2024

Closing in favor of #29898

@thetaPC thetaPC closed this Sep 27, 2024
@thetaPC thetaPC deleted the ROU-11149 branch September 27, 2024 19:05
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.

2 participants