tomusborne / generateblocks

GenerateBlocks is a small collection of lightweight WordPress blocks that can accomplish nearly anything.
https://generateblocks.com
198 stars 23 forks source link

GB 2.0 Pre-alpha Image block in responsive views requires max-width containment #1384

Closed diggeddy closed 1 month ago

diggeddy commented 1 month ago

Image blocks have no max-width control within responsive views, resulting in unwanted overflow:

Screenshot 2024-10-21 at 15 48 06
iansvo commented 1 month ago

I added a PR for this which applies max-width, height, and object-fit by default to the images.

I think adding object-fit makes sense here also because 99% of the time, this is the desired behavior, especially for someone who doesn't know CSS. The default behavior for the img tag is not intuitive and someone can always change it if that is somehow what they actually want.

iansvo commented 1 month ago

Resolved in #1389