diff --git a/src/resources/formats/html/glightbox/lightbox.css b/src/resources/formats/html/glightbox/lightbox.css
index 2c29fe1bb93..46432d990ad 100644
--- a/src/resources/formats/html/glightbox/lightbox.css
+++ b/src/resources/formats/html/glightbox/lightbox.css
@@ -5,6 +5,10 @@ body:not(.glightbox-mobile) div.gslide-description .gslide-desc {
background-color: var(--quarto-body-bg);
}
+body:not(.glightbox-mobile) div.gslide-media {
+ background-color: var(--quarto-body-bg);
+}
+
.goverlay {
background: rgba(0, 0, 0, 0.7);
}