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

Dev build: 8.7.13-dev.11765920447.1a01ab8b

@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 16, 2025 9:56pm

@github-actions github-actions bot added the package: core @ionic/core package label Dec 12, 2025
@thetaPC thetaPC marked this pull request as ready for review December 12, 2025 20:13
@thetaPC thetaPC requested a review from a team as a code owner December 12, 2025 20:13
@thetaPC thetaPC requested a review from gnbm December 12, 2025 20:13
Copy link
Member

@ShaneK ShaneK left a comment

Choose a reason for hiding this comment

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

This looks good to me! Excellent work 🎉

Copy link
Member

@brandyscarney brandyscarney left a comment

Choose a reason for hiding this comment

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

Some questions / feedback on tests here.

@thetaPC thetaPC changed the title refactor(core): use Capacitor's new safe area variables fix(core): use Capacitor's new safe area variables Dec 16, 2025
@brandyscarney brandyscarney changed the title fix(core): use Capacitor's new safe area variables fix(core): use Capacitor safe-area CSS variables on older WebViews Dec 18, 2025
@brandyscarney brandyscarney added this pull request to the merge queue Dec 18, 2025
github-merge-queue bot pushed a commit that referenced this pull request Dec 18, 2025
…30865)

Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

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

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Capacitor 8 has released [safe area variable
fallbacks](https://capacitorjs.com/docs/apis/system-bars#android-note)
to provide consistent behaviors with older Android devices:

> Due to a [bug](https://issues.chromium.org/issues/40699457) 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
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Dev build: `8.7.13-dev.11765920447.1a01ab8b`

---------

Co-authored-by: Brandy Smith <[email protected]>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 18, 2025
@brandyscarney brandyscarney added this pull request to the merge queue Dec 18, 2025
Merged via the queue into main with commit 8573bf8 Dec 18, 2025
53 checks passed
@brandyscarney brandyscarney deleted the FW-6987 branch December 18, 2025 18:28
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