Skip to content

Commit 2cb629a

Browse files
Overlay: Fix position for fullscreen overlay on narrow screens (#5835)
Co-authored-by: Marie Lucca <40550942+francinelucca@users.noreply.github.com>
1 parent 5d66a4c commit 2cb629a

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

.changeset/light-beds-stare.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/react": patch
3+
---
4+
5+
Overlay: Fix position for fullscreen overlay on narrow screens

packages/react/src/Overlay/Overlay.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@
158158
}
159159

160160
&:where([data-variant='fullscreen']) {
161+
position: fixed;
161162
top: 0;
162163
left: 0;
163164
width: 100vw;

packages/react/src/Overlay/Overlay.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ const StyledOverlay = toggleStyledComponent(
104104
}
105105
106106
&:where([data-variant='fullscreen']) {
107+
position: fixed;
107108
top: 0;
108109
left: 0;
109110
width: 100vw;

packages/react/src/__tests__/__snapshots__/AnchoredOverlay.test.tsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ exports[`AnchoredOverlay should render consistently when open 1`] = `
3131
}
3232
3333
.c1:where([data-variant='fullscreen']) {
34+
position: fixed;
3435
top: 0;
3536
left: 0;
3637
width: 100vw;

0 commit comments

Comments
 (0)