Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Background-size transitions in Chrome 51 - a bug or a feature?

Background-size transitions are no longer working in Chrome 51. I know that it was never supposed to work (see this), but it did and still many people used it. I'm talking about percentage transitions on hover.

I'm wondering if this is a bug in the new Chrome (which is possible, since this version brings a lot of new stuff), or they've decided to remove that transition for good?

No issues in other browsers.


div {
  background: url(http://cdn2.business2community.com/wp-content/uploads/2014/12/Super-Mario-no-longer-the-007.jpg) no-repeat center center;
  background-size: 50%;
  display: inline-block;
  height: 276px;
  width: 460px;
  transition: all 0.5s linear;
}
div:hover {
  background-size: 100%;
}
<div></div>

UPDATE

As @Paran0a noticed, it works fine with vendor-specific prefix, so it's probably a bug (submitted a bug-report):


div {
  background: url(http://cdn2.business2community.com/wp-content/uploads/2014/12/Super-Mario-no-longer-the-007.jpg) no-repeat center center;
  -webkit-background-size: 50%;
  display: inline-block;
  height: 276px;
  width: 460px;
  transition: all 0.5s linear;
}
div:hover {
  -webkit-background-size: 100%;
}
<div></div>
like image 958
Shomz Avatar asked May 31 '16 11:05

Shomz


2 Answers

Turns out this was a bug: https://bugs.chromium.org/p/chromium/issues/detail?id=616072

It's scheduled to be fixed in the next milestone, and this is the patch: https://chromium.googlesource.com/chromium/src.git/+/8793a7bac4d2d56e38c8bd406920128e1ceb7a9a

like image 144
Shomz Avatar answered Sep 27 '22 22:09

Shomz


Had this problem and was able to fix it by changing my rules from

background-size: 115%;

to

background-size: 115% 115%;

like image 35
Austin Avatar answered Sep 27 '22 22:09

Austin