Skip to content

Commit 57b55f9

Browse files
committed
US206196 code revisions
* removed z-index map and reset modal to z-index: 2000 * moved slotted header code to be within pfe-modal__content
1 parent ad21ace commit 57b55f9

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

elements/pfe-modal/src/pfe-modal.scss

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ $pfe-modal--breakpoint--medium: 640px;
88
--pfe-modal--MinWidth: 50vw;
99
--pfe-modal--MaxWidth--mobile: 94vw;
1010
--pfe-modal--MaxHeight: 90vh;
11-
--pfe-modal--Padding: calc(#{pfe-var(container-padding)} * 2) calc(#{pfe-var(container-padding)} * 3) calc(#{pfe-var(container-padding)} * 2) calc(#{pfe-var(container-padding)} * 2);
11+
--pfe-modal--Padding: calc(#{pfe-var(container-padding)} * 2) calc(#{pfe-var(container-padding)} * 3.5) calc(#{pfe-var(container-padding)} * 2) calc(#{pfe-var(container-padding)} * 2);
1212
--pfe-modal__overlay--BackgroundColor: #{pfe-color(overlay)};
1313
--pfe-modal__close--size: calc(#{pfe-var(ui--element--size)} - 4px);
1414
display: block;
@@ -30,11 +30,10 @@ $pfe-modal--breakpoint--medium: 640px;
3030
flex-direction: column;
3131
align-items: center;
3232
justify-content: center;
33-
z-index: #{pfe-var($cssvar: modal, $map: $z-index)};
33+
z-index: var(--pfe-z--modal, 2000); // Reset this to use the z-index map.
3434

3535
&[hidden] {
3636
display: none;
37-
z-index: #{pfe-var($cssvar: content, $map: $z-index)};
3837
}
3938
}
4039
&__overlay {
@@ -71,17 +70,6 @@ $pfe-modal--breakpoint--medium: 640px;
7170
&[hidden] {
7271
display: none;
7372
}
74-
75-
:host(:not([has_header])) & {
76-
77-
// Remove margin-top on the first slotted element that is not the header.
78-
::slotted(*:nth-child(2)) {
79-
margin-top: 0 !important;
80-
}
81-
}
82-
::slotted([slot="pfe-modal--header"]) {
83-
margin-top: 0 !important;
84-
}
8573
}
8674

8775
&__content {
@@ -99,6 +87,19 @@ $pfe-modal--breakpoint--medium: 640px;
9987
box-sizing: border-box;
10088
--pfe-modal--Padding: #{pfe-var(container-padding)} calc(#{pfe-var(container-padding)} * 3) #{pfe-var(container-padding)} #{pfe-var(container-padding)};
10189
}
90+
91+
:host(:not([has_header])) & {
92+
93+
// Remove margin-top on the first slotted element that is not the header.
94+
::slotted(*:nth-child(2)),
95+
::slotted(*:nth-child(1)) {
96+
margin-top: 0 !important;
97+
}
98+
}
99+
100+
::slotted([slot="pfe-modal--header"]) {
101+
margin-top: 0 !important;
102+
}
102103
}
103104

104105
&__close {

elements/pfe-sass/variables/_maps.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,3 @@ $pfe-vars: (
227227
animation-timing: cubic-bezier(0.465, 0.183, 0.153, 0.946),
228228
opacity: .3
229229
);
230-
231-
$z-index: (
232-
modal: 99,
233-
navigation: 98,
234-
overlay: 97,
235-
content: 0
236-
);

0 commit comments

Comments
 (0)