Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f
- Updated open styleguide pr to create multiple pull requests to update `polaris-react` across multiple repos ([#1069](https://github.com/Shopify/polaris-react/pull/1069))
- Updated the pull request creation to retry when it fails ([#1069](https://github.com/Shopify/polaris-react/pull/1069))
- Exported overlay and layer data attributes for use in consumer components ([#1266](https://github.com/Shopify/polaris-react/pull/1266))
- Added new `frame-with-nav-max-width` variable and matching `frame-with-nav-when-not-max-width` mixin ([#1311](https://github.com/Shopify/polaris-react/pull/1311))

- Updated `Resizer` to schedule `handleHeightCheck` to run in next animation frame ([#1301](https://github.com/Shopify/polaris-react/pull/1301))

Expand Down
7 changes: 7 additions & 0 deletions src/styles/shared/breakpoints.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
$page-max-width: layout-width(primary, max) + layout-width(secondary, max) +
layout-width(inner-spacing);
$frame-with-nav-max-width: layout-width(nav) + $page-max-width;

$stacked-content: em(
layout-width(primary, min) + layout-width(secondary, min) +
Expand Down Expand Up @@ -131,6 +132,12 @@ $nav-min-window: em(layout-width(page-with-nav));
}
}

@mixin frame-with-nav-when-not-max-width() {
@include breakpoint-before($frame-with-nav-max-width) {
@content;
}
}

@mixin page-when-not-max-width() {
@include breakpoint-before($page-max-width) {
@content;
Expand Down