diff --git a/fixtures/2000x2000-white.png b/fixtures/2000x2000-white.png new file mode 100644 index 0000000000..042ebb76d4 Binary files /dev/null and b/fixtures/2000x2000-white.png differ diff --git a/ts/components/Lightbox.stories.tsx b/ts/components/Lightbox.stories.tsx index f82b588ea1..dd452b1116 100644 --- a/ts/components/Lightbox.stories.tsx +++ b/ts/components/Lightbox.stories.tsx @@ -42,7 +42,7 @@ story.add('Image', () => { return ; }); -story.add('Image with Caption', () => { +story.add('Image with Caption (normal image)', () => { const props = createProps({ caption: 'This is the user-provided caption. It can get long and wrap onto multiple lines.', @@ -52,6 +52,16 @@ story.add('Image with Caption', () => { return ; }); +story.add('Image with Caption (all-white image)', () => { + const props = createProps({ + caption: + 'This is the user-provided caption. It should be visible on light backgrounds.', + objectURL: '/fixtures/2000x2000-white.png', + }); + + return ; +}); + story.add('Video', () => { const props = createProps({ contentType: VIDEO_MP4, diff --git a/ts/components/Lightbox.tsx b/ts/components/Lightbox.tsx index d6fc3e4c56..d5041ac974 100644 --- a/ts/components/Lightbox.tsx +++ b/ts/components/Lightbox.tsx @@ -107,6 +107,8 @@ const styles = { right: 0, textAlign: 'center', color: 'white', + fontWeight: 'bold', + textShadow: '0 0 1px black, 0 0 2px black, 0 0 3px black, 0 0 4px black', padding: '1em', paddingLeft: '3em', paddingRight: '3em',