1

Just a heads up that object-fit: Cover; is no longer working behaving strangely in the latest Chrome update.(Version 92.0.4515.107 (Official Build) (64-bit), I'm not sure if it's a bug or not!

I've literally just spent an hour trying to figure out if any files had changed whilst developing a website as the slider which uses that CSS rule was no longer working as it should, so I tried on another PC with Chrome and it was working perfect until I updated through the settings. I've submitted a bug report just in-case.

Edit: Although something has definitely changed in the new update with the CSS rules, e.g: in a bootstrap 4.6 carousel, I was forced to use some extra CSS rules so it did not behave like it did in IE. Basically I had a full width carousel, with video as the first slide and a couple of images with buttons etc, which worked perfectly across all browsers apart from IE, adding the below code fixed it.

.bg-slider .carousel-item img{
width:100vw !important;
height:475px;
object-fit: cover;
background-position: center center;
}

.bg-slider .carousel-item video{
width:100vw !important;
height:475px;
object-fit: cover;
background-position: center center;
}
Chris
  • 11
  • 3
  • Welcome to SO! I recommend that all new visitors to the site visit [ask] for tips on how the site works. I find it very admirable that you are attempting to share knowledge with the community here on potential issues in Chrome. However, I would like to recommend you amend your approach a bit. As it is currently written, this is likely to be closed as "not a question". Instead, I'd recommend 1) Opening a bug to Chrome to report this. 2) If it is confirmed to be a bug, _then_ open a question asking why `object-fit` isn't working and 3) Before posting the question, include an answer! – Alexander Nied Jul 23 '21 at 14:49
  • 1
    Self-answering a question is a perfectly viable information-sharing strategy on SO. Thanks, good luck, and happy coding! – Alexander Nied Jul 23 '21 at 14:50

0 Answers0