Pressbooks Book theme - why "width: auto" on center aligned images?

So…First and foremost, we’ve updated to PB 4.5.1! Yay! :smiley:

So, our theme is a child theme for pressbooks-book, and we’re experiencing some weird issues in our content. Chief among them is that all center aligned non-captioned images seem to have width: auto applied to them, which is causing the images to ignore the width and height html attributes. We don’t want these images to take up the full space, rather, we want to have more control over how big or small the images are.

Is there a way to do this that I’m not seeing? When I open up the inspector in chrome, and i toggle of width: auto, the issue goes away.

NOTE: The top image is not what we’re after. The bottom image is the desired behavior.

The culprit is on line 50 of pressbooks-book/assets/book/styles/components/media/_images-web.scss.

Removing width: auto from wp-caption, wp-nocaption &.aligncenter img gives more control over image size for center aligned images.

Would PB be willing to remove this?

1 Like

Yes! We’ll change this. Thanks!

1 Like

Thank you so much! :smiley: