generateblocks
generateblocks copied to clipboard
Image Block improve object-fit
Image Block Improvements:
-
Add
object-position
property to the block settings. Value support is the same asbackground-position
https://developer.mozilla.org/en-US/docs/Web/CSS/object-position -
Auto add
height: 100%
to<figure>
element if Object Fit is set and the Image Height has a%
value. This is to resolve the issue highlighted below.
See example images.
The columns are variable height. And the images both have object-fit: cover
and height: 100%
The right hand <figure>
has been given height: 100%
to illustrate the differences.
For the given settings a users expectations would be that the right hand one is correct.
Consider:
If Image Block has object-fit: cover
and height
has a % value then <figure>
should have height: 100%
@diggeddy would be great if we could also get the object-position
option to have better control over the postioning when object-fit is used. Sometimes just having it default to center center
is not always ideal.
Agreed — even if it was just the same implementation as background image position where you have a blank field you can type in.