Skip to content

Commit

Permalink
fix(tab-bar): safe area padding now added when slot="top" (#23895)
Browse files Browse the repository at this point in the history
resolves #23893
  • Loading branch information
liamdebeasi authored Sep 8, 2021
1 parent 8888e2b commit 4782969
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion core/src/components/tab-bar/tab-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
}

:host([slot="top"]) {
padding-top: var(--ion-safe-area-top, 0);
padding-bottom: 0;

border-top: 0;
Expand All @@ -71,4 +72,4 @@
:host(.tab-bar-hidden) {
/* stylelint-disable-next-line declaration-no-important */
display: none !important;
}
}
9 changes: 8 additions & 1 deletion core/src/components/tabs/test/placements/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet">
<script src="../../../../../scripts/testing/scripts.js"></script>
<script nomodule src="../../../../../dist/ionic/ionic.js"></script>
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script></head>
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>

<style>
:root {
--ion-safe-area-top: 20px;
}
</style>
</head>

<body>

Expand Down

0 comments on commit 4782969

Please sign in to comment.