mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
UX: handle super tall images in onebox respectfully.
Tall images got distorted previously
This commit is contained in:
parent
ac4b4e30dc
commit
2fe131db9f
1 changed files with 2 additions and 1 deletions
|
@ -156,10 +156,11 @@ aside.onebox {
|
||||||
|
|
||||||
.aspect-image {
|
.aspect-image {
|
||||||
max-height: 170px;
|
max-height: 170px;
|
||||||
|
--magic-ratio: calc(var(--aspect-ratio) + 0.15);
|
||||||
|
width: calc(128px * var(--magic-ratio));
|
||||||
max-width: 20%;
|
max-width: 20%;
|
||||||
float: left;
|
float: left;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
width: 100%;
|
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue