Skip to content

Conversation

@thetaPC
Copy link
Contributor

@thetaPC thetaPC commented Dec 12, 2025

Issue number: internal


What is the current behavior?

The safe area variables are only reliant on env variables that are provided by devices.

What is the new behavior?

Capacitor 8 has released safe area variable fallbacks to provide consistent behaviors with older Android devices:

Due to a bug in some older versions of Android WebView (< 140), correct safe area values are not available via the safe-area-inset-x CSS env variables. This plugin will inject the correct inset values into a new CSS variable(s) named --safe-area-inset-x that you can use as a fallback in your frontend styles.

  • Updated safe area variables to use the fallbacks provided by Capacitor.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Changes to the core file will be done on main.

@vercel
Copy link

vercel bot commented Dec 12, 2025

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

Project Deployment Review Updated (UTC)
ionic-framework Ready Ready Preview, Comment Dec 18, 2025 5:10pm

@brandyscarney brandyscarney changed the title refactor(core-ionic): use Capacitor's new safe area variables fix(core): use Capacitor safe-area CSS variables on older WebViews Dec 18, 2025
@brandyscarney brandyscarney changed the title fix(core): use Capacitor safe-area CSS variables on older WebViews refactor(core): use Capacitor safe-area CSS variables on older WebViews Dec 18, 2025
@brandyscarney brandyscarney marked this pull request as ready for review December 18, 2025 16:26
@brandyscarney brandyscarney requested a review from a team as a code owner December 18, 2025 16:26
@brandyscarney brandyscarney requested a review from ShaneK December 18, 2025 16:26
@brandyscarney
Copy link
Member

I'm marking this as a refactor so it doesn't show up in the Changelog twice since the fix was made on main already.

Copy link
Member

@brandyscarney brandyscarney Dec 18, 2025

Choose a reason for hiding this comment

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

It looks like this test uses the legacy Picker and the ionic theme does not have styles for it so this is expected: https://ionic-framework-git-fw-6987-next-ionic1.vercel.app/src/components/app/test/safe-area?ionic:theme=ionic

@brandyscarney brandyscarney merged commit 5bb5cc6 into next Dec 18, 2025
49 checks passed
@brandyscarney brandyscarney deleted the FW-6987-next branch December 18, 2025 18:41
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.

5 participants