File tree Expand file tree Collapse file tree 1 file changed +19
-26
lines changed
dotcom-rendering/src/components Expand file tree Collapse file tree 1 file changed +19
-26
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ const styles = css`
36
36
` ;
37
37
38
38
const galleryBodyImageStyles = css `
39
- display : flex;
40
39
${ grid . column . all }
40
+ position : relative;
41
41
42
42
${ from . tablet } {
43
43
${ grid . column . centre }
@@ -74,33 +74,26 @@ export const GalleryImage = ({
74
74
75
75
return (
76
76
< 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
86
89
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 }
91
94
/>
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 >
104
97
105
98
< GalleryCaption
106
99
captionHtml = { image . data . caption }
You can’t perform that action at this time.
0 commit comments