Skip to content

Commit

Permalink
refactor: remove use of constant() as no longer required (#3113)
Browse files Browse the repository at this point in the history
  • Loading branch information
jouni authored Nov 26, 2021
1 parent 7c73520 commit 4d04457
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions packages/app-layout/src/safe-area-inset.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,10 @@ $_documentContainer.innerHTML = `
<style>
/* Use units so that the values can be used in calc() */
html {
--safe-area-inset-top: constant(safe-area-inset-top, 0px);
--safe-area-inset-right: constant(safe-area-inset-right, 0px);
--safe-area-inset-bottom: constant(safe-area-inset-bottom, 0px);
--safe-area-inset-left: constant(safe-area-inset-left, 0px);
}
@supports (padding-left: env(safe-area-inset-left)) {
html {
--safe-area-inset-top: env(safe-area-inset-top, 0px);
--safe-area-inset-right: env(safe-area-inset-right, 0px);
--safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
--safe-area-inset-left: env(safe-area-inset-left, 0px);
}
--safe-area-inset-top: env(safe-area-inset-top, 0px);
--safe-area-inset-right: env(safe-area-inset-right, 0px);
--safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
--safe-area-inset-left: env(safe-area-inset-left, 0px);
}
</style>
`;
Expand Down

0 comments on commit 4d04457

Please sign in to comment.