- From: L. David Baron <dbaron@dbaron.org>
- Date: Fri, 19 Feb 2016 18:39:54 -0800
- To: Simon Fraser <smfr@me.com>
- Cc: www-style list <www-style@w3.org>
- Message-ID: <20160220023954.GA7207@pescadero.dbaron.org>
On Friday 2016-02-19 18:28 -0800, Simon Fraser wrote:
> There is some trickiness with interpolation of side-relative <position> values. Consider:
>
> @keyframes shifty {
> from { background-position: 20px; }
> to { background-position: right 20px; }
> }
>
> Should that work? To make it work you’d have to know the box size when doing interpolation, or I suppose the UA could turn it into a calc() expression?
In Gecko it works because we internally represent computed values of
background-position as calc() of a length and a percent, since the
three-value and four-value variants can all be reduced to that.
This is consistent with the "Computed value:" line in
https://drafts.csswg.org/css-backgrounds/#the-background-position ,
so I believe it's correct, and that because of that "Computed
value:" line, this should work per spec.
(That said, I suspect I may have written that "Computed value:"
line, so I'm certainly willing to discuss if you think it should
change.)
-David
--
𝄞 L. David Baron http://dbaron.org/ 𝄂
𝄢 Mozilla https://www.mozilla.org/ 𝄂
Before I built a wall I'd ask to know
What I was walling in or walling out,
And to whom I was like to give offense.
- Robert Frost, Mending Wall (1914)
Received on Saturday, 20 February 2016 02:40:23 UTC