File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
dotcom-rendering/src/components Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ export const CardBranding = ({
8383 data-testid = "card-branding-logo"
8484 data-component = { dataAttributes ?. ophanComponentName }
8585 data-link-name = { dataAttributes ?. ophanComponentLink }
86+ className = "branding-logo"
8687 >
8788 < picture >
8889 { darkModeAvailable && branding . logoForDarkBackground && (
Original file line number Diff line number Diff line change @@ -58,7 +58,8 @@ const hoverStyles = css`
5858 : has (
5959 ul .sublinks : hover ,
6060 .loop-video-container : hover ,
61- .slideshow-carousel : hover
61+ .slideshow-carousel : hover ,
62+ .branding-logo : hover
6263 ) {
6364 .card-headline .show-underline {
6465 text-decoration : none;
Original file line number Diff line number Diff line change 55 visuallyHidden ,
66} from '@guardian/source/foundations' ;
77import { decideBrandingLogo } from '../lib/decideLogo' ;
8+ import { getZIndex } from '../lib/getZIndex' ;
89import { palette } from '../palette' ;
910import type { Branding } from '../types/branding' ;
1011import type { DCRContainerPalette } from '../types/front' ;
@@ -52,6 +53,11 @@ const verticalStyles = {
5253 ` ,
5354} ;
5455
56+ const linkStyles = css `
57+ /* See: https://css-tricks.com/nested-links/ */
58+ z- index: ${ getZIndex ( 'card-nested-link' ) } ;
59+ ` ;
60+
5561/**
5662 * Component used to display "paid for" label alonside the sponsor logo
5763 * for a particular set of branding
@@ -90,13 +96,15 @@ export const SponsoredContentLabel = ({
9096 : 'This content has been paid for by an advertiser and produced by the Guardian Labs team.' }
9197 </ span >
9298 < a
99+ css = { linkStyles }
93100 href = { logo . link }
94101 data-sponsor = { branding . sponsorName . toLowerCase ( ) }
95102 rel = "nofollow"
96103 aria-label = { `Visit the ${ branding . sponsorName } website` }
97104 data-testid = "branding-logo"
98105 data-component = { ophanComponentName }
99106 data-link-name = { ophanComponentLink }
107+ className = "branding-logo"
100108 >
101109 < picture >
102110 { darkModeAvailable && branding . logoForDarkBackground && (
You can’t perform that action at this time.
0 commit comments