---
title: "Capacitor Edge-to-Edge & Safe Areas: The Complete Guide"
description: Handle Android edge-to-edge and iOS safe areas in Capacitor 8 and 9 — copy-paste CSS, SystemBars, Ionic and Tailwind setup, plus a plugin migration checklist.
date:
  created: 2026-05-29
  updated: 2026-11-24
authors:
  - robingenz
categories:
  - Capacitor
  - Guides
  - Ionic Framework
faq: true
---

# Capacitor Edge-to-Edge & Safe Areas: The Complete Guide

Modern Android draws every app behind the status bar and the navigation bar, and iOS has done the same since the iPhone X. In a Capacitor app, that means your WebView extends under the system bars, and your CSS decides whether a header title or a bottom button ends up hidden beneath them.

Capacitor now handles most of this natively. Capacitor 8 added built-in inset handling for Android, releases up to 8.6.1 fixed its gaps, and Capacitor 9 changes the default once more. This guide covers the setup that works on both versions, copy-paste CSS for common layouts, Ionic and Tailwind specifics, and a checklist for moving off the [Capacitor Android Edge-to-Edge Support plugin](../../sdks/capacitor/android-edge-to-edge-support.md).

<!-- more -->

<div class="capawesome-z29o10a">
  <a href="https://capawesome.io/" target="_blank">
    <img alt="Ship a fix in one command with Capawesome Cloud Live Updates, no store review" src="https://capawesome.io/assets/banners/cloud-ship-a-fix-in-one-command.png" />
  </a>
</div>

**Key takeaways:**

- Android 15 enforces edge-to-edge for apps targeting SDK 35, and apps targeting SDK 36, which Google Play requires since August 31, 2026, can no longer opt out.
- On Capacitor 8.6.1 or later, `viewport-fit=cover` plus `var(--safe-area-inset-*, env(safe-area-inset-*))` handles safe areas on iOS and Android without a plugin.
- Capacitor 9 defaults `insetsHandling` to `native`, which stops injecting the `--safe-area-inset-*` variables, but the `var()` and `env()` pattern keeps working through its fallback.
- Capacitor 8.6.1 stops reporting the navigation bar inset while the keyboard is open and respects `windowSoftInputMode="adjustNothing"`.
- The Capacitor Android Edge-to-Edge Support plugin remains the right choice for legacy apps you don't want to restyle and for projects on Capacitor 7.

## What edge-to-edge means

Edge-to-edge is a layout where app content extends under the system bars: the status bar at the top, the navigation bar or gesture indicator at the bottom, and the display cutout in landscape. The bars stay visible, but they sit on top of your content instead of pushing it away. Your app has to keep interactive elements out of those areas.

The web platform describes those areas as safe-area insets. The `env(safe-area-inset-top)`, `env(safe-area-inset-right)`, `env(safe-area-inset-bottom)` and `env(safe-area-inset-left)` CSS functions return the distance in CSS pixels that content must stay clear of on each edge. iOS has exposed them since 2017, and many Capacitor projects already use them there.

## What changed on Android

Android made edge-to-edge mandatory in two steps. Starting with [Android 15 (API level 35)](https://developer.android.com/about/versions/15/behavior-changes-15#edge-to-edge){:target="_blank"}, the system enforces edge-to-edge for any app that targets SDK 35 or later, but the `windowOptOutEdgeToEdgeEnforcement` attribute could still turn it off. [Android 16](https://developer.android.com/about/versions/16/behavior-changes-16){:target="_blank"} disables that opt-out for apps that target SDK 36. Google Play has [required SDK 36](https://support.google.com/googleplay/android-developer/answer/11926878){:target="_blank"} for new apps and app updates since August 31, 2026, so every update you ship now renders edge-to-edge on Android 16.

That broke three common Capacitor workarounds:

- **StatusBar options stopped working.** Setting `overlaysWebView: false` and `backgroundColor` on the `@capacitor/status-bar` plugin relied on the opt-out, so neither option works in an app that targets SDK 36.
- **The CSS values were wrong.** Android WebView versions below 140 have [a bug](https://issues.chromium.org/issues/40699457){:target="_blank"} where `env(safe-area-inset-*)` returns incorrect values.
- **Projects needed a plugin.** Many projects installed the Capacitor Android Edge-to-Edge Support plugin, which applies the insets to the WebView itself so the content never goes edge-to-edge.

## What Capacitor fixed

The built-in `SystemBars` API shipped in `@capacitor/core` 8.0.0 and has taken over more of the inset handling on Android with each release:

| Version | Change |
| ------- | ------ |
| 8.0.0 | `SystemBars` ships with `@capacitor/core` and injects the inset values as `--safe-area-inset-*` CSS variables on Android |
| 8.3.0 | `SystemBars` uses the native safe-area insets on Android ([#8384](https://github.com/ionic-team/capacitor/pull/8384){:target="_blank"}) |
| 8.3.1 | The status bar and the navigation bar get separate style state |
| 8.3.2 | Extra view padding on Android API level 34 and below is removed |
| 8.4.0 | Injected variables work on API level 34 and below, `show({ bar })` reveals only that bar, and `insetsHandling: "disable"` is respected ([details](./whats-new-in-capacitor-8-4-0.md)) |
| 8.5.2 | The `native` value for `insetsHandling`, plus a batch of safe-area fixes that closes several `SystemBars` and Keyboard plugin issues ([#8535](https://github.com/ionic-team/capacitor/pull/8535){:target="_blank"}) |
| 8.6.1 | Two keyboard fixes, covered in [Keyboard and navigation](#keyboard-and-navigation) |

The `insetsHandling` option controls how [SystemBars](https://capacitorjs.com/docs/apis/system-bars){:target="_blank"} works around the WebView bug. With `native`, Capacitor pads the WebView on WebView versions below 140 and sets the `env()` values to `0px`, and on version 140 and later it lets the WebView follow the `viewport-fit` meta tag. With `css`, it does the same and also injects `--safe-area-inset-*` variables with the correct inset values. `disable` turns inset handling off. In Capacitor 8, the default is `css`, and `native` is available from 8.5.2.

## Capacitor 9 changes

Capacitor 9 changes the default `insetsHandling` value from `css` to `native` ([#8599](https://github.com/ionic-team/capacitor/pull/8599){:target="_blank"}). The [Capacitor 9 update guide](https://capacitorjs.com/docs/next/updating/9-0){:target="_blank"} states that this "no longer injects the `--safe-area-inset-*` CSS variables". The first release candidate shipped on November 12, 2026.

The CSS in this guide reads the injected variable first and falls back to `env()`, so it keeps working after the upgrade without changes. Code that reads `--safe-area-inset-*` on its own, without an `env()` fallback, needs one of two fixes: switch it to `env(safe-area-inset-*)`, or set `insetsHandling` to `css` to keep the variables.

The Capacitor 9 Android template also enables edge-to-edge in `MainActivity`, and the migrator adds that call to existing projects unless `insetsHandling` is `disable`. On Capacitor 8, the SystemBars documentation recommends adding it yourself whenever inset handling is enabled:

```java title="android/app/src/main/java/com/example/app/MainActivity.java"
package com.example.app;

import android.os.Bundle;
import androidx.activity.EdgeToEdge;
import com.getcapacitor.BridgeActivity;

public class MainActivity extends BridgeActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
    }
}
```

## Recommended setup

The setup below targets Capacitor 8.6.1 and later, including Capacitor 9. The first three steps are required. The last two are optional.

### Upgrade Capacitor

Upgrade all Capacitor packages to 8.6.1 or later to get the keyboard fixes from the table above:

```bash
npm install @capacitor/core@^8.6.1 @capacitor/cli@^8.6.1 @capacitor/android@^8.6.1 @capacitor/ios@^8.6.1
npx cap sync
```

If you are coming from Capacitor 7, follow [How to Upgrade Your Capacitor App to Capacitor 8](./how-to-upgrade-your-capacitor-app-to-capacitor-8.md) first.

### Set viewport-fit

The `viewport-fit=cover` value in the viewport meta tag lets the page lay out to the full size of the screen, under the safe areas. On Android WebView 140 and later, Capacitor also reads it to decide whether the WebView goes edge-to-edge. Add it to `index.html`:

```html
<meta
  name="viewport"
  content="width=device-width, initial-scale=1, viewport-fit=cover"
/>
```

Without it, the page keeps the default `viewport-fit=auto` behavior, which WebKit [describes](https://webkit.org/blog/7929/designing-websites-for-iphone-x/){:target="_blank"} as automatic insetting instead of an edge-to-edge layout.

### Apply safe-area CSS

The safe-area pattern for Capacitor reads the injected `--safe-area-inset-*` variable first, falls back to `env(safe-area-inset-*)`, and ends with `0px` for browsers and desktop previews that define neither:

```css
.app-header {
  padding-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
}

.app-footer {
  padding-bottom: var(
    --safe-area-inset-bottom,
    env(safe-area-inset-bottom, 0px)
  );
}
```

To combine an inset with your own spacing, wrap the expression in `calc()`:

```css
.app-header {
  padding-top: calc(
    var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 1rem
  );
}
```

The [layout patterns](#layout-patterns) section below turns this into reusable classes.

### Configure SystemBars

The `SystemBars` API is part of `@capacitor/core`, so there is nothing to install. Its most common setting is the icon style, which you can set in the Capacitor configuration:

```typescript title="capacitor.config.ts"
import type { CapacitorConfig } from "@capacitor/cli";

const config: CapacitorConfig = {
  plugins: {
    SystemBars: {
      style: "DARK",
    },
  },
};

export default config;
```

`DARK` shows light icons for a dark background, `LIGHT` shows dark icons for a light background, and `DEFAULT` follows the device appearance. To change the style at runtime, for example when the user switches themes, call `setStyle()` with an optional `bar`:

```typescript
import { SystemBars, SystemBarsStyle, SystemBarType } from "@capacitor/core";

await SystemBars.setStyle({
  bar: SystemBarType.StatusBar,
  style: SystemBarsStyle.Dark,
});
```

`SystemBars` has no `setOverlaysWebView()` or `setBackgroundColor()` method. For a colored status bar or navigation bar, use a [background element](#system-bar-colors) instead.

### Check iOS settings

On iOS, the `SystemBars` API needs `UIViewControllerBasedStatusBarAppearance` set to `YES` in `Info.plist`, which is the default in new Capacitor projects. The `UIStatusBarStyle` key sets the style shown before your JavaScript loads, so match it to your splash screen:

```xml title="ios/App/App/Info.plist"
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleDarkContent</string>
```

The iOS WebView has always returned correct `env(safe-area-inset-*)` values, so the same CSS covers the notch, the Dynamic Island and the home indicator.

## Layout patterns

The following snippets cover the layouts that cause most safe-area bugs. Each one uses the `var()` and `env()` pattern, so it works with every `insetsHandling` value except `disable`.

### Utility classes

Defining the insets once as custom properties keeps the fallback chain in a single place. Add this to your global stylesheet:

```css
:root {
  --safe-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --safe-right: var(--safe-area-inset-right, env(safe-area-inset-right, 0px));
  --safe-bottom: var(
    --safe-area-inset-bottom,
    env(safe-area-inset-bottom, 0px)
  );
  --safe-left: var(--safe-area-inset-left, env(safe-area-inset-left, 0px));
}

.pt-safe {
  padding-top: var(--safe-top);
}

.pb-safe {
  padding-bottom: var(--safe-bottom);
}

.px-safe {
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

.p-safe {
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom)
    var(--safe-left);
}
```

Apply the classes in your markup like any other utility:

```html
<header class="pt-safe px-safe">...</header>
<main class="px-safe">...</main>
<nav class="pb-safe px-safe">...</nav>
```

### Fixed bars

A fixed header or bottom navigation needs the inset added to its height, not only its padding, or its content shrinks by the size of the status bar. Keep the content height and grow the element:

```css
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(56px + var(--safe-top));
  padding-top: var(--safe-top);
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(64px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
}

.page {
  padding-top: calc(56px + var(--safe-top));
  padding-bottom: calc(64px + var(--safe-bottom));
}
```

On iPhones with a home button, `--safe-bottom` resolves to `0px`. If your bottom navigation looks cramped there, use `max()` to set a minimum gap, for example `padding-bottom: max(var(--safe-bottom), 8px)`.

### Landscape and cutouts

In landscape, the notch or display cutout moves to one side, and the left and right insets become non-zero. Full-width elements such as lists and toolbars need horizontal padding, while backgrounds can still extend to the edge:

```css
.list-item {
  padding-left: calc(16px + var(--safe-left));
  padding-right: calc(16px + var(--safe-right));
}
```

### System bar colors

With edge-to-edge, the system bars have no background of their own, and your content shows through them. To give a bar a solid color, place a fixed element with the height of its inset behind it:

```html
<div class="status-bar-background"></div>
<div class="navigation-bar-background"></div>
```

Then style both elements in your global stylesheet:

```css
.status-bar-background,
.navigation-bar-background {
  position: fixed;
  left: 0;
  right: 0;
  background-color: #3880ff;
  z-index: 1000;
}

.status-bar-background {
  top: 0;
  height: var(--safe-top);
}

.navigation-bar-background {
  bottom: 0;
  height: var(--safe-bottom);
}
```

Pair the color with a matching `SystemBars` style so the icons stay readable. With three-button navigation, Android draws a mostly opaque contrast scrim over the bar, so most of the color is covered there. With gesture navigation, the color shows in full.

## Keyboard and navigation

The Android navigation bar comes in two modes, and each needs different handling. With gesture navigation, the bar is a thin transparent strip, and your content shows through it. With three-button navigation, the bar is taller, Android draws a translucent scrim behind the buttons ([80% opacity on Android 15](https://developer.android.com/about/versions/15/behavior-changes-15){:target="_blank"}), and the bottom inset grows accordingly. Test both, since the setting is a user choice in Android's system settings.

`SystemBars` can only set the icon style of the navigation bar, not its background color. To color the bar area, use the [navigation bar background element](#system-bar-colors). The [Capacitor Navigation Bar plugin](../../sdks/capacitor/navigation-bar.md) documents that its `setColor(...)` method has no visible effect on Android 15 and later, because the system keeps the bar transparent under edge-to-edge.

The on-screen keyboard is the other common source of bottom-inset bugs. Before Capacitor 8.6.1, `SystemBars` kept reporting the navigation bar inset while the keyboard was open, so a footer pinned above the keyboard floated with an extra gap. Version 8.6.1 fixes that ([#8707](https://github.com/ionic-team/capacitor/pull/8707){:target="_blank"}) and also respects `android:windowSoftInputMode="adjustNothing"` in `AndroidManifest.xml` ([#8619](https://github.com/ionic-team/capacitor/pull/8619){:target="_blank"}), for apps that position content around the keyboard themselves.

## Hiding system bars

Immersive screens such as video players, games and camera views hide the system bars. Use `SystemBars.hide()` and `SystemBars.show()`, optionally with a single `bar`:

```typescript
import { SystemBars, SystemBarType } from "@capacitor/core";

const enterImmersiveMode = async () => {
  await SystemBars.hide();
};

const exitImmersiveMode = async () => {
  await SystemBars.show();
};

const hideNavigationBar = async () => {
  await SystemBars.hide({ bar: SystemBarType.NavigationBar });
};
```

On iOS, hiding the navigation bar, with a plain `hide()` or with `bar: SystemBarType.NavigationBar`, sets the home indicator to auto-hide. iOS fades it out while the screen is idle and shows it again when the user touches the screen. On iOS, `hide()` and `show()` also accept an `animation` option (`FADE` or `NONE`), and `setAnimation()` sets the default. To start the app with hidden bars, set `hidden: true` in the `SystemBars` configuration.

## Ionic Framework

Ionic components apply safe-area padding on their own. `ion-header` pads the top, `ion-footer` and `ion-tab-bar` pad the bottom, and `ion-toolbar` and `ion-tab-bar` pad the sides. They read the `--ion-safe-area-top`, `--ion-safe-area-right`, `--ion-safe-area-bottom` and `--ion-safe-area-left` variables, which Ionic's core stylesheet sets to `var(--safe-area-inset-*, env(safe-area-inset-*))`, the same pattern as this guide. Adding your own inset to those components counts it twice.

Two cases need manual CSS. The first is [`ion-fab`](https://ionicframework.com/docs/api/fab){:target="_blank"}. The Ionic documentation warns that without an `ion-header` or `ion-footer`, "the fab may be covered by a device's notch, status bar, or other device UI". A FAB with `vertical="top"` on a page without a header sits directly under the status bar. Add margins based on the Ionic variables:

```css
ion-fab[vertical="top"] {
  margin-top: var(--ion-safe-area-top, 0);
}

ion-fab[vertical="bottom"] {
  margin-bottom: var(--ion-safe-area-bottom, 0);
}
```

The second case is a page without `ion-header`, such as a full-screen map or an onboarding screen. Nothing pads the top of `ion-content` there, so set its `--padding-top` property to the inset:

```css
.headerless ion-content {
  --padding-top: var(--ion-safe-area-top, 0);
}
```

If you combine Ionic with Tailwind, our post on the [Tailwind CSS plugin for Ionic Framework](./tailwind-css-plugin-for-ionic-framework.md) shows how to scope utilities per platform.

## Tailwind CSS

The community package [`tailwindcss-safe-area`](https://github.com/mvllow/tailwindcss-safe-area){:target="_blank"} adds safe-area utilities to Tailwind. Install it with `npm install tailwindcss-safe-area` and import it after Tailwind in your main CSS file (this is the Tailwind v4 setup; for v3, see the package README):

```css
@import "tailwindcss";
@import "tailwindcss-safe-area";
```

The utilities follow Tailwind's spacing names:

```html
<header class="pt-safe">...</header>
<main class="px-safe">...</main>
<footer class="pb-safe-or-4">...</footer>
```

`pt-safe-offset-4` adds the inset plus `1rem`, and `pb-safe-or-4` uses the inset or `1rem`, whichever is larger. The package also covers margins, scroll padding, heights such as `h-dvh-safe`, and positioning such as `top-safe`.

The package reads `env()` only, not the injected `--safe-area-inset-*` variables. That is safe with both `native` and `css` inset handling, because both modes pad the WebView on old WebView versions, as described in [What Capacitor fixed](#what-capacitor-fixed).

## Migrating from the plugin

Moving a project from the Capacitor Android Edge-to-Edge Support plugin to the built-in inset handling takes one pass through your configuration and your styles. The plugin applies insets to the WebView, so your CSS has never seen non-zero insets on Android. Plan for a styling pass on every screen with content at the top or bottom edge.

1. **Upgrade Capacitor** to 8.6.1 or later, as described in [Upgrade Capacitor](#upgrade-capacitor).
2. **Remove the plugin** with `npm uninstall @capawesome/capacitor-android-edge-to-edge-support` followed by `npx cap sync`.
3. **Clean up the configuration.** Delete the `EdgeToEdge` block and the `insetsHandling: "disable"` line from `capacitor.config.ts`, so `SystemBars` uses its default again.
4. **Replace plugin calls.** Calls to `EdgeToEdge.setBackgroundColor()`, `EdgeToEdge.setStatusBarColor()` and `EdgeToEdge.setNavigationBarColor()` become [background elements](#system-bar-colors), and `EdgeToEdge.getInsets()` becomes the CSS variables.
5. **Add `viewport-fit=cover`** to the viewport meta tag, if it isn't there yet.
6. **Apply the safe-area CSS** to headers, footers, fixed elements and full-screen pages, using the [layout patterns](#layout-patterns) or your framework's components.
7. **Enable edge-to-edge in `MainActivity`** on Capacitor 8, as shown in [Capacitor 9 changes](#capacitor-9-changes).
8. **Test on real devices** with the matrix in the next section.

If the styling pass is larger than you can take on now, keep the plugin. It still works on Capacitor 8, and the reasons to keep it are listed under [When the plugin fits](#when-the-plugin-fits).

## Test matrix

Emulators cover most inset cases, but test at least one physical Android device before you release. Check every screen with content at an edge in these configurations:

- **Android API level 34 or lower**, where edge-to-edge is not enforced by default.
- **Android 15 and 16**, with both gesture navigation and three-button navigation.
- **An Android WebView below 140**, if your users run older devices (check the version under Settings > Apps > Android System WebView).
- **An iPhone with a notch or Dynamic Island**, and an iPhone with a home button.
- **Landscape orientation** on both platforms, for the left and right insets.
- **The keyboard open** on screens with inputs near the bottom edge.

## When the plugin fits

The Capacitor Android Edge-to-Edge Support plugin preserves the pre-Android 15 layout. Despite its name, it does not turn edge-to-edge on. It applies the system bar insets to the WebView, so your web content never reaches under the bars, and your CSS needs no safe-area handling on Android. Three situations still favor it:

- **Legacy apps you don't want to restyle.** An app with many screens written before edge-to-edge can keep its Android layout unchanged.
- **Capacitor 7 projects.** The built-in inset handling only exists in Capacitor 8. Version 7.x of the plugin supports Capacitor 7, but it is marked as deprecated.
- **Colored system bars without extra markup.** The plugin's [`setStatusBarColor(...)`](../../sdks/capacitor/android-edge-to-edge-support.md#setstatusbarcolor) and [`setNavigationBarColor(...)`](../../sdks/capacitor/android-edge-to-edge-support.md#setnavigationbarcolor) methods color the bar areas natively.

The plugin requires `insetsHandling: "disable"` in the `SystemBars` configuration, so the two inset mechanisms don't run at the same time. If you use the Capacitor Keyboard plugin alongside it, keep `resizeOnFullScreen` at its default of `false`. The [plugin documentation](../../sdks/capacitor/android-edge-to-edge-support.md#installation) covers both settings.

## FAQ

### Do I still need a plugin for edge-to-edge in Capacitor?

No. On Capacitor 8.6.1 or later, `viewport-fit=cover` and the safe-area CSS variables are enough. The Capacitor Android Edge-to-Edge Support plugin is only needed to keep the pre-Android 15 layout, for example in a legacy app you don't want to restyle or a project on Capacitor 7.

### Why does my content render under the status bar?

The WebView extends behind the system bars once edge-to-edge is active, which is the default for apps that target SDK 35 or later on Android 15 and later, and on iOS with `viewport-fit=cover`. Pad your headers, footers and fixed elements with `var(--safe-area-inset-*, env(safe-area-inset-*))`, `pt-safe`, or the Ionic `--ion-safe-area-*` variables.

### Do the safe-area CSS variables still work in Capacitor 9?

Capacitor 9 no longer injects the `--safe-area-inset-*` variables by default, because `insetsHandling` defaults to `native`. CSS written as `var(--safe-area-inset-*, env(safe-area-inset-*))` keeps working through the `env()` fallback. To keep the injected variables, set `insetsHandling` to `css`.

### How do I set a status bar color on Android 16?

`StatusBar.setBackgroundColor()` has no effect in an app that targets SDK 36. Place a fixed HTML element with the height of the top inset behind the status bar, and one with the height of the bottom inset behind the navigation bar. Alternatively, the `setStatusBarColor(...)` and `setNavigationBarColor(...)` methods of the Capacitor Android Edge-to-Edge Support plugin color both bars natively.

### Why is there a gap above my keyboard on Android?

Before Capacitor 8.6.1, `SystemBars` kept reporting the navigation bar inset while the keyboard was open, which added the inset to elements pinned above the keyboard. Upgrade to Capacitor 8.6.1 or later.

### Do I need separate CSS for iOS and Android?

No. The `var()` and `env()` pattern resolves to the correct values on both platforms once `viewport-fit=cover` is set.

### How do I hide the home indicator on iOS?

Call `SystemBars.hide({ bar: SystemBarType.NavigationBar })`. iOS then sets the home indicator to auto-hide, so it fades out while the screen is idle and reappears when the user touches the screen. iOS does not let apps remove it permanently. The [Capacitor Home Indicator plugin](../../sdks/capacitor/home-indicator.md) does the same, and its [`isHidden()`](../../sdks/capacitor/home-indicator.md#ishidden) method reports the current state.

## Get started

Our newsletter covers new Capacitor releases like Capacitor 9 as they ship, including the changes that affect your layout.

[Subscribe to the Capawesome Newsletter](https://capawesome.io/newsletter/){ .md-button .md-button--primary }

## Conclusion

For a new project or one already on Capacitor 8.6.1, go CSS-first: set `viewport-fit=cover`, add the safe-area utility classes, and write every inset as `var(--safe-area-inset-*, env(safe-area-inset-*))` so the upgrade to Capacitor 9 needs no CSS changes. Keep the Capacitor Android Edge-to-Edge Support plugin only for a legacy app without time for a styling pass, or until you leave Capacitor 7. Ad banners cause similar overlap problems, and [How to Fix AdMob Banner Overlap in a Capacitor App](./how-to-fix-admob-banner-overlap-in-capacitor.md) covers them.

Bring your questions and edge cases to the [Capawesome Discord server](https://discord.gg/VCXxSVjefW){:target="_blank"}, and subscribe to the [Capawesome newsletter](https://capawesome.io/newsletter/){:target="_blank"} for the next deep dive.
