App Store onebox images are distorted

Well that was a nightmare:

This is fixed in latest due to this magic:

https://github.com/discourse/discourse/commit/2fe131db9f0cc2e8f53a2d3334019466cd845968

 --magic-ratio: calc(var(--aspect-ratio) + 0.15);
 width: calc(128px * var(--magic-ratio));

If an image is tall we go and take the widest possible onebox image we allow which is 128px and then multiply it by aspect + 0.15.

This works cause now we have 2 widths set, the max-width and the explicit one.

Very very complicated to come up with this hack, it works fine :passenger_ship:

8 curtidas