Skip to content

Commit 215b792

Browse files
[Frame] Accommodate sidebar in scrollbar safe container (#11900)
Patching #11891 to accommodate the sidebar width shift
1 parent c84d4e8 commit 215b792

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.changeset/pink-keys-act.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': patch
3+
---
4+
5+
Fixed `Frame` scrollbar safe area to accommodate sidebar

polaris-react/src/components/Frame/Frame.module.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,29 @@
295295

296296
.ScrollbarSafeArea-TopBarAndReframe {
297297
@media (--p-breakpoints-md-up) {
298+
transition: width var(--p-motion-duration-250) var(--p-motion-ease);
298299
/* stylelint-disable -- polaris/conventions/polaris/custom-property-allowed-list -- Polaris component custom properties */
299300
width: calc(
300301
100vw - var(--pg-navigation-width) -
301302
var(--pc-app-provider-scrollbar-width) - var(--p-space-150)
302303
);
303304
/* stylelint-enable -- polaris/conventions/polaris/custom-property-allowed-list */
304305
}
306+
307+
.hasSidebar & {
308+
transition: width var(--p-motion-duration-250) var(--p-motion-ease);
309+
310+
/* Sidebar breakpoint is 1200px */
311+
/* stylelint-disable-next-line polaris/media-queries/polaris/media-query-allowed-list -- custom breakpoint */
312+
@media screen and (min-width: 1200px) {
313+
/* stylelint-disable-next-line polaris/conventions/polaris/custom-property-allowed-list -- private token from component */
314+
width: calc(
315+
100vw - var(--pg-navigation-width) -
316+
var(--pc-app-provider-scrollbar-width) - var(--p-space-150) -
317+
var(--pc-sidebar-width)
318+
);
319+
}
320+
}
305321
}
306322

307323
.GlobalRibbonContainer {

0 commit comments

Comments
 (0)