Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dotcom-rendering/src/lib/adStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { css } from '@emotion/react';
import { adSizes, constants } from '@guardian/commercial-core';
import { from, textSans12, until } from '@guardian/source/foundations';
import { palette } from '../palette';
import { getZIndex } from './getZIndex';

const labelHeight = constants.AD_LABEL_HEIGHT;

Expand Down Expand Up @@ -137,6 +138,7 @@ const spacefinderAdSlotContainerStyles = css`
/* this fixes inter-scrollers stealing mouse events */
overflow: hidden;
position: relative;
z-index: ${getZIndex('interscrollerAd')};

/* position the iframe absolutely (relative to the slot) so that it is in the correct position to detect viewability */
.ad-slot__content {
Expand Down
3 changes: 3 additions & 0 deletions dotcom-rendering/src/lib/getZIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ const indices = [
// Edition selector in nav - needs to be below stickyAdWrapper
'editionDropdown',

// Interscroller ads need their own stacking context to force the background image below the ad to stop it capturing mouse events
'interscrollerAd',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a challenge to work out where this should sit in the z-index ranking. Please check my homework.


// The content displayed by the Details component
'summaryDetails',

Expand Down
Loading