Skip to content

Commit 103d86e

Browse files
committed
share zindex value for edition switcher banner with sticky labs header banner
1 parent c8b837e commit 103d86e

File tree

9 files changed

+29
-11
lines changed

9 files changed

+29
-11
lines changed

dotcom-rendering/src/components/EditionSwitcherBanner.importable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const container = css`
1919
position: relative;
2020
top: 0;
2121
background-color: ${palette.brand[800]};
22-
z-index: ${getZIndex('editionSwitcherBanner')};
22+
z-index: ${getZIndex('subNavBanner')};
2323
`;
2424

2525
const content = css`

dotcom-rendering/src/layouts/AudioLayout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,17 @@ export const AudioLayout = (props: WebProps) => {
191191
</div>
192192

193193
{format.theme === ArticleSpecial.Labs && (
194-
<Stuck>
194+
<Stuck zIndex="subNavBanner">
195195
<Section
196196
fullWidth={true}
197197
showTopBorder={false}
198198
backgroundColour={sourcePalette.labs[400]}
199199
borderColour={sourcePalette.neutral[60]}
200200
sectionId="labs-header"
201201
element="aside"
202+
css={css`
203+
position: relative;
204+
`}
202205
>
203206
<LabsHeader editionId={editionId} />
204207
</Section>

dotcom-rendering/src/layouts/FullPageInteractiveLayout.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,17 @@ export const FullPageInteractiveLayout = (props: WebProps | AppsProps) => {
232232
/>
233233

234234
{format.theme === ArticleSpecial.Labs && (
235-
<Stuck>
235+
<Stuck zIndex="subNavBanner">
236236
<Section
237237
fullWidth={true}
238238
showTopBorder={false}
239239
padSides={true}
240240
backgroundColour={sourcePalette.labs[400]}
241241
borderColour={sourcePalette.neutral[60]}
242242
sectionId="labs-header"
243+
css={css`
244+
position: relative;
245+
`}
243246
>
244247
<LabsHeader editionId={editionId} />
245248
</Section>
@@ -263,6 +266,9 @@ export const FullPageInteractiveLayout = (props: WebProps | AppsProps) => {
263266
backgroundColour={sourcePalette.labs[400]}
264267
borderColour={sourcePalette.neutral[60]}
265268
sectionId="labs-header"
269+
css={css`
270+
position: relative;
271+
`}
266272
>
267273
<LabsHeader editionId={editionId} />
268274
</Section>

dotcom-rendering/src/layouts/GalleryLayout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,17 @@ export const GalleryLayout = (props: WebProps | AppProps) => {
220220
)}
221221

222222
{format.theme === ArticleSpecial.Labs && (
223-
<Stuck>
223+
<Stuck zIndex="subNavBanner">
224224
<Section
225225
fullWidth={true}
226226
showTopBorder={false}
227227
backgroundColour={sourcePalette.labs[400]}
228228
borderColour={sourcePalette.neutral[60]}
229229
sectionId="labs-header"
230230
element="aside"
231+
css={css`
232+
position: relative;
233+
`}
231234
>
232235
<LabsHeader editionId={editionId} />
233236
</Section>

dotcom-rendering/src/layouts/ImmersiveLayout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,13 +333,16 @@ export const ImmersiveLayout = (props: WebProps | AppProps) => {
333333
)}
334334

335335
{format.theme === ArticleSpecial.Labs && (
336-
<Stuck>
336+
<Stuck zIndex="subNavBanner">
337337
<Section
338338
fullWidth={true}
339339
showTopBorder={false}
340340
backgroundColour={sourcePalette.labs[400]}
341341
borderColour={sourcePalette.neutral[60]}
342342
sectionId="labs-header"
343+
css={css`
344+
position: relative;
345+
`}
343346
>
344347
<LabsHeader editionId={editionId} />
345348
</Section>

dotcom-rendering/src/layouts/InteractiveLayout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,13 +298,16 @@ export const InteractiveLayout = (props: WebProps | AppsProps) => {
298298
</div>
299299

300300
{format.theme === ArticleSpecial.Labs && (
301-
<Stuck>
301+
<Stuck zIndex="subNavBanner">
302302
<Section
303303
fullWidth={true}
304304
showTopBorder={false}
305305
backgroundColour={sourcePalette.labs[400]}
306306
borderColour={sourcePalette.neutral[60]}
307307
sectionId="labs-header"
308+
css={css`
309+
position: relative;
310+
`}
308311
>
309312
<LabsHeader editionId={editionId} />
310313
</Section>

dotcom-rendering/src/layouts/ShowcaseLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ export const ShowcaseLayout = (props: WebProps | AppsProps) => {
332332
/>
333333
</Stuck>
334334
</div>
335-
<Stuck zIndex="stickyAdWrapperLabsHeader">
335+
<Stuck zIndex="subNavBanner">
336336
<Section
337337
fullWidth={true}
338338
showTopBorder={false}

dotcom-rendering/src/layouts/StandardLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ export const StandardLayout = (props: WebProps | AppProps) => {
430430
)}
431431

432432
{format.theme === ArticleSpecial.Labs && (
433-
<Stuck>
433+
<Stuck zIndex="subNavBanner">
434434
<Section
435435
fullWidth={true}
436436
showTopBorder={false}

dotcom-rendering/src/lib/getZIndex.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ const indices = [
7171
'searchHeaderLink',
7272
'TheGuardian',
7373

74-
// The edition switcher banner needs to be below the Edition selector
75-
// and the myAccount dropdown in the nav
76-
'editionSwitcherBanner',
74+
// Banners appearing directly under the nav need to be below
75+
// the Edition selector and the myAccount dropdown in the nav
76+
'subNavBanner',
7777

7878
// Sticky table of contents element
7979
'tableOfContents',

0 commit comments

Comments
 (0)