Lightboxed images do not have `vertical-align` set, misaligning them with naked `img`s

Priority/Severity: Low.
Platform: Confirmed in Firefox 127.0 on Windows 10 and Chrome 125.0.6422.165 on Android 14.
Description: See below.
Reproducible steps: Place two images, one with a resolution of above 690×500 pixels (in either dimension) and one with a resolution below, on the same line.


Expected behavior

Lightboxed images and naked imgs should be treated the same way by CSS, bar all the extra bells and whistles of a lightbox.

The issue

Discourse’s built-in CSS has vertical-align: middle set for img, but not for .lightbox-wrapper, resulting in lightboxed and non-lightboxed images on the same line being out of alignment and taking up unnecessary vertical space:

The solution

The fix is simple: Add vertical-align: middle to .lightbox-wrapper as well.

4 Likes

Thanks for the detailed report! A fix has been applied here:

and will be available in Discourse updates soon

4 Likes

Wonderful! Thanks a bundle and a half! :blush:

1 Like

This topic was automatically closed after 3 days. New replies are no longer allowed.