Skip to content

Commit

Permalink
Add back in scrollbar safe area
Browse files Browse the repository at this point in the history
  • Loading branch information
sophschneider committed Apr 30, 2024
1 parent 5e64873 commit eaf3cd1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
12 changes: 12 additions & 0 deletions polaris-react/src/components/Frame/Frame.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,18 @@
}

.Content-TopBarAndReframe {
height: 100%;

.hasSidebar & {
/* Sidebar breakpoint is 1200px */
/* stylelint-disable-next-line polaris/media-queries/polaris/media-query-allowed-list -- custom breakpoint */
@media screen and (min-width: 1200px) {
margin-right: unset;
}
}
}

.ScrollbarSafeArea-TopBarAndReframe {
@media (--p-breakpoints-md-up) {
transition: width var(--p-motion-duration-250) var(--p-motion-ease);
/* stylelint-disable -- polaris/conventions/polaris/custom-property-allowed-list -- Polaris component custom properties */
Expand Down
7 changes: 6 additions & 1 deletion polaris-react/src/components/Frame/Frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ class FrameInner extends PureComponent<CombinedProps, State> {
{hasDynamicTopBar ? (
<Scrollable
scrollbarWidth="thin"
horizontal={false}
className={styles.Scrollable}
id={APP_FRAME_SCROLLABLE}
>
Expand All @@ -332,7 +333,11 @@ class FrameInner extends PureComponent<CombinedProps, State> {
)}
id={APP_FRAME_CONTENT}
>
{children}
<div
className={styles['ScrollbarSafeArea-TopBarAndReframe']}
>
{children}
</div>
</div>
</Scrollable>
) : (
Expand Down

0 comments on commit eaf3cd1

Please sign in to comment.