[css-backgrounds] calc()
values when interpolating background-position
#6197
Labels
css-backgrounds-3
Current Work
I'm confused by the two interpolation WPT tests for
background-position
.First, in css/css-backgrounds/animations/background-position-origin-interpolation.html:
Chrome passes this test while Firefox yields
calc()
values with an addition with0%
, for instancecalc(0 % + 10px) calc(0% + 10px)
for the0.5
case. Safari fails in a different way but I have a pending WebKit fix that would produce the same result as Firefox.Then, consider css/css-backgrounds/animations/background-position-interpolation.html:
There, Firefox and Chrome both pass the test, and my pending patch in WebKit also passes it.
Is there spec wording anywhere that would support this difference?
As far as WebKit is concerned, I can explain the behavior: since
left
andtop
keywords compute to 0%, we blend between a percentage and a dimension and yieldcalc()
values. I imagine Chrome might treat these values differently due to their origin as keywords, but I'm not finding wording in the spec to support this approach.Prior discussion about this with @birtles and @flackr can be found in an Animation at work Slack thread but all the relevant information is found in this issue as well.
The text was updated successfully, but these errors were encountered: