TryGhost / Koenig

Components of Ghost's Editor

Home Page:https://koenig.ghost.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change to Product card image tag may break themes

johlym opened this issue · comments

Not sure if this was bubbled up properly into the broader change, but 32ffc96 caused image stretching issues in a few themes of mine; it looks like there was the assumption previously that the image size would be inferred, and once it was explicitly set in the <img> tag, things started getting a little wonky.

I've been able to adjust for this somewhat surprising change with width: 100%; height: auto; for the .kg-card img selector.

This made the change even quirkier because existing cards aren't affected, only new ones.

That's all. Just wanted to report the effects.

Maybe @kevinansfield can give a more detailed answer than this - but it sounds like expected behaviour that has been assumed for some time now.

In Ghost 4.0 we introduced the need to add width: 100%; height: auto; as a breaking change:

Themes: due to content images having width / height attributes, themes with CSS that use max-width may need to add height: auto to prevent images appearing squashed or stretched.

Going to close this for now as I don't think there's anything we need to change.