seanmturley / natureddit

A simple Reddit client, featuring a landing page dedicated to nature with posts pulled from a curated list of subreddits.
0 stars 1 forks source link

Restrict max-height of images in Post #165

Closed seanmturley closed 5 months ago

seanmturley commented 5 months ago

Description

Many portrait images are too tall to fit the viewport e.g. this example. This prevents these images from being appreciated in their entirety. Restricting the max-height to something like the following may make sense:

calc(100vh - var(--nav-bar-height) - "some amount of padding")

This may cause issues with horizontal centering, but those should be easily resolved.

I thought I had restricted max-height at some point, but I can't find any evidence of that now.

seanmturley commented 5 months ago

This turned out to be a bug introduced during the recent implementation of the Gallery (#162).

A class name change for the container around the image in Post prevented some CSS from applying. It turned out that this CSS clashes with the Gallery CSS anyway, so the solution was to move the container so that it only wraps images, and not the Gallery.