Skip to content

Commit 02fcda5

Browse files
marjisoundJamieB-gu
andcommitted
Remove the un necessary styling in gallery image
Co-authored-by: Jamie B <[email protected]>
1 parent bd4cb44 commit 02fcda5

File tree

1 file changed

+19
-26
lines changed

1 file changed

+19
-26
lines changed

dotcom-rendering/src/components/GalleryImage.tsx

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ const styles = css`
3636
`;
3737

3838
const galleryBodyImageStyles = css`
39-
display: flex;
4039
${grid.column.all}
40+
position: relative;
4141
4242
${from.tablet} {
4343
${grid.column.centre}
@@ -74,33 +74,26 @@ export const GalleryImage = ({
7474

7575
return (
7676
<figure css={styles}>
77-
<span css={galleryBodyImageStyles}>
78-
<span
79-
css={css`
80-
position: relative;
81-
`}
82-
>
83-
<Picture
84-
alt={image.data.alt ?? ''}
85-
format={format}
77+
<div css={galleryBodyImageStyles}>
78+
<Picture
79+
alt={image.data.alt ?? ''}
80+
format={format}
81+
role={image.role}
82+
master={asset.url}
83+
width={width}
84+
height={height}
85+
loading="lazy"
86+
/>
87+
{renderingTarget === 'Web' && !isUndefined(image.position) && (
88+
<LightboxLink
8689
role={image.role}
87-
master={asset.url}
88-
width={width}
89-
height={height}
90-
loading="lazy"
90+
format={format}
91+
elementId={image.elementId}
92+
isMainMedia={false}
93+
position={image.position}
9194
/>
92-
{renderingTarget === 'Web' &&
93-
!isUndefined(image.position) && (
94-
<LightboxLink
95-
role={image.role}
96-
format={format}
97-
elementId={image.elementId}
98-
isMainMedia={false}
99-
position={image.position}
100-
/>
101-
)}
102-
</span>
103-
</span>
95+
)}
96+
</div>
10497

10598
<GalleryCaption
10699
captionHtml={image.data.caption}

0 commit comments

Comments
 (0)