Skip to content

Commit 8108377

Browse files
koddssonlangermankJosep Martins
authored
Make sure to apply backdrops only to one Overlay (#2249)
* Make sure to apply backdrops only to one Overlay * Update overlay.scss * Create stale-drinks-arrive.md * Update stale-drinks-arrive.md Co-authored-by: Katie Langerman <[email protected]> Co-authored-by: Josep Martins <[email protected]>
1 parent 26aea66 commit 8108377

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.changeset/stale-drinks-arrive.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@primer/css": patch
3+
---
4+
5+
Increase specificy for Overlay styles as they relate to the backdrop and positioning options
6+
- If a Dialog opens a second Dialog, each Dialog properties should be contained to its own scope

src/overlay/overlay.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ $primer-borderRadius-large: 0.75rem;
345345
align-items: center;
346346
justify-content: left;
347347

348-
.Overlay#{$responsiveVariant} {
348+
> .Overlay#{$responsiveVariant} {
349349
height: 100vh;
350350
max-height: unset;
351351
border-radius: $primer-borderRadius-large;
@@ -362,7 +362,7 @@ $primer-borderRadius-large: 0.75rem;
362362
align-items: center;
363363
justify-content: right;
364364

365-
.Overlay#{$responsiveVariant} {
365+
> .Overlay#{$responsiveVariant} {
366366
height: 100vh;
367367
max-height: unset;
368368
border-radius: $primer-borderRadius-large;
@@ -379,7 +379,7 @@ $primer-borderRadius-large: 0.75rem;
379379
align-items: end;
380380
justify-content: center;
381381

382-
.Overlay#{$responsiveVariant} {
382+
> .Overlay#{$responsiveVariant} {
383383
width: 100vw;
384384
height: auto;
385385
max-height: calc(100vh - 2rem);
@@ -397,7 +397,7 @@ $primer-borderRadius-large: 0.75rem;
397397
align-items: start;
398398
justify-content: center;
399399

400-
.Overlay#{$responsiveVariant} {
400+
> .Overlay#{$responsiveVariant} {
401401
border-radius: $primer-borderRadius-large;
402402
border-top-left-radius: 0;
403403
border-top-right-radius: 0;

0 commit comments

Comments
 (0)