Onebox thumbnail sizing is messed up


(Adam Capriola) #1

I think this started when I upgraded to 9.9.12. Here’s an example onebox:

In the preview the thumbnail looks ok, but after I publish the is CSS overwritten:

aside.onebox .onebox-body img {
max-height: 80%;
max-width: 25%;
height: auto;
float: left;
margin-right: 10px;
}
.topic-body img:not(.avatar), .topic-body svg {
max-width: 100% !important;
height: auto !important;
}

(Jeff Atwood) #2

Yeah I can confirm that. @awesomerobot is this something you put in? The !important is kind of odd and dangerous, particularly on images … if images don’t contain the correct height and width the page load will be super jumpy.

(This is unavoidable on mobile, I know, but we should be able to avoid it on desktop.)


(Kris) #3

gah, yeah that shouldn’t be in there - I’ll fix now

https://github.com/discourse/discourse/pull/2533


(Jeff Atwood) #4