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>
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>
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
Had this problem and was able to fix it by changing my rules from
background-size: 115%;
to
background-size: 115% 115%;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With