Daemonite / discourse-material-theme

Material Design for Discourse
MIT License
21 stars 28 forks source link

Uploaded images appear stretched #21

Open amotl opened 5 years ago

amotl commented 5 years ago

Dear @sesemaya,

after upgrading the theme to the most recent release (see [1]), we are pleased about how smooth this was. Thanks again for your awesome work on this!

When revisiting #14, we found that while the image display works well in the editor preview now, image

images which are higher then wide are still getting stretched to the total width of the post, which will look like this in display mode

image

You can find the respective post where this happens at [2]. Thanks in advance for looking into that if you can find the time.

With kind regards, Andreas.

[1] https://meta.discourse.org/t/daemonite-material-theme/64521/75 [2] https://meta.ip-tools.org/t/no-family-information-for-de69423220t2/137/2

amotl commented 5 years ago

Hi there,

we found it's the display: block; CSS attribute of the container lightbox element which is stretching the images to their full widths.

<a class="lightbox" href="..." data-download-href="..." title="image.png"><img src="..." alt="image" class="d-lazyload" srcset="..." width="295" height="250">
</a>

When removing this guy, everything starts working as intended. image

With kind regards, Andreas.

amotl commented 5 years ago

We just released version 0.3.0 of our layout tweaks which now incorporates the appropriate workaround through https://github.com/ip-tools/discourse-material-theme-ample/commit/2d621e88.