WAIT: [1.3.7b] Object Fit

Bricks Version: 1.3.7b
Browser: Chrome
OS: Windows 11

Hey Chaps,

Object fit is a small but awesome little addition to 1.3.7 but the control is not responsive please see the video

I have also added in the video that units are not able to be selected from the control in height and width settings inside the layout. (I have seen a couple of posts with similar bugs relating to this, so this may be already covered by you guys). :+1:

Hi Michael,

The image needs either a width or a fixed height (or both) to make object-fit work properly.
It’s best practice to set the width to 100% and a fixed height, 300px, for example (image element » style). Here is a quick screen recording showing the behavior in Bricks + unit-select fix.

Please check out this short video by Kevin Powell as well, in which he explains how object-fit works.

Best regards,

Thanks bud, Yes I do like that guy and watch his videos.

If I set the width to 100% to an image inside a 400 H x 200 W rectangle then it would still not work?

Also are you using a different version of the beta? As you where able to select the units in the width and height controls of the image? At the end of my video you will see it not work for me and had to key in the % mark in the unit box.

Thanks again for the time to send me a screen recording and will give the video you sent a watch :+1:


you don’t need to set a width or a height on the outer container, only on the image. Maybe this conflicts with our widths bug (which is already fixed in my version), so yes, I am a couple of fixes ahead :smiley:

That’s Cool @timmse

Yes I understand, I meant in the case of the available space remaining in the container (in my case a stretched inner container to the outer container resulting in a remaining space of 400px H x 200px W not set explicitly). If applying an image width 100% as long as the image is bigger width-wise than the height of the remaining 200px H then it would cover the whole area (if object-fit is set to cover of course)?

That’s awesome to know regards the input controls thanks bud.