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

fix(card): border radius does not overflow on paint in Safari #26539

Merged
merged 4 commits into from
Feb 21, 2023

Conversation

sean-perkins
Copy link
Contributor

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
    • Some docs updates need to be made in the ionic-docs repo, in a separate PR. See the contributing guide for details.
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

In Safari 16:

<ion-card>
  <ion-list>
    <ion-item></ion-item>
  </ion-list>
</ion-card>

The card border radius is not respected on the initial paint and the list edges will overflow the container. This is not present in Safari 15.

Isolating the styles, the contain: content (specifically contain: paint) causes the list overflow to be visible in Safari 16.

Reproduction of issue: https://stackblitz.com/edit/angular-cnclwc-yhx4lf

Issue URL: #26529

What is the new behavior?

  • Applies contain: content on the ion-card so that the descendents overflows respect the containing element's box sizing.
  • ion-card border radius does not overflow in Safari 16.

Reproduction with dev-build changes: https://stackblitz.com/edit/angular-cnclwc-4myqzy

Does this introduce a breaking change?

  • Yes
  • No

Other information

Dev-build: 6.4.2-dev.11672163551.15de10fd

@github-actions github-actions bot added the package: core @ionic/core package label Dec 27, 2022
@sean-perkins sean-perkins marked this pull request as ready for review December 29, 2022 20:44
@sean-perkins sean-perkins requested a review from a team as a code owner December 29, 2022 20:44
Copy link
Contributor

@liamdebeasi liamdebeasi left a comment

Choose a reason for hiding this comment

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

Why are there diffs on Google Chrome?

@liamdebeasi
Copy link
Contributor

@sean-perkins Do we still want to merge this?

@sean-perkins
Copy link
Contributor Author

@liamdebeasi yes I do, I need to rebase and re-run the screenshot job as well. I don't have an answer as to why there are diffs in Google Chrome - outside of the assumption that these styles have a minor visual rendering difference on Chrome (but oddly for only 1 specific template).

@sean-perkins
Copy link
Contributor Author

Ok - it looks like the diff is consistent, but I would be comfortable moving forward with it for the benefit it brings (solving the Safari 16 border radius overflow).

Copy link
Contributor

@liamdebeasi liamdebeasi left a comment

Choose a reason for hiding this comment

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

I'm fine moving forward with this. There is a slight change to chrome, but that could be intentional based on how contain: content was implemented in that browser. The value add (fixing this bug in Safari) is greater than the small layout change in Chrome.

@sean-perkins sean-perkins merged commit df5c8e2 into main Feb 21, 2023
@sean-perkins sean-perkins deleted the fix/item-border-radius branch February 21, 2023 22: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.

4 participants