Skip to content

Commit

Permalink
Merge pull request #881 from Shopify/fix-safe-area-for-mixin-with-fal…
Browse files Browse the repository at this point in the history
…lback

fix safe area for mixin with fallback
  • Loading branch information
danrosenthal authored Jan 16, 2019
2 parents 6a029c6 + 6080c63 commit 5e47062
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f

- Ensure disabled `Button` components with a `url` prop output valid HTML ([#773](https://github.com/Shopify/polaris-react/pull/773))
- Fixed `DropZone` which was unable to add a duplicate file back to back or add a file again once removed [#782](https://github.com/Shopify/polaris-react/pull/782). Thank you [@jzsplk](https://github.com/jzsplk) for the contribution [#425](https://github.com/Shopify/polaris-react/issues/425) and [@vladucu](https://github.com/vladucu) for the clear example.
- Added a fallback to the `safeAreaFor` sass mixin to handle browsers that don't support `env` and `constant` [#881](https://github.com/Shopify/polaris-react/pull/881)

### Documentation

Expand Down
1 change: 1 addition & 0 deletions src/styles/shared/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/// $spacing.
@mixin safe-area-for($property, $spacing, $area) {
$spacing: if($spacing == 0, #{$spacing}px, $spacing);
#{$property}: #{$spacing};
#{$property}: calc(#{$spacing} + constant(safe-area-inset-#{$area}));
#{$property}: calc(#{$spacing} + env(safe-area-inset-#{$area}));
}
Expand Down

0 comments on commit 5e47062

Please sign in to comment.