- From: Brad Kemper <brad.kemper@gmail.com>
- Date: Wed, 1 Feb 2012 21:43:03 -0800
- To: Brian Manthos <brianman@microsoft.com>
- Cc: Sylvain Galineau <sylvaing@microsoft.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, "L. David Baron" <dbaron@dbaron.org>, www-style list <www-style@w3.org>, fantasai <fantasai@inkedblade.net>
On Feb 1, 2012, at 12:56 PM, Brian Manthos <brianman@microsoft.com> wrote: >> background-position: calc(50% + 2px); >> then it would resolve to: >> background-position: 51%; /* which is 102px */ Actually the 51% point of the image (not the left edge) lining up with 102px (51% point) of the 200px background. >> But if you had this: >> >> background-position: calc(2px + 50%); >> then it would resolve to this: >> background-position: 102px; > > Specifying calc resolution such that it doesn't respect commutativity would be awful. OK. I more than half expected that reaction, and Tab didn't like it either. > If you really want to make... > calc(a + b) != calc(b + a) > then it shouldn't be expressed this way. > > You need something more like > calc(a, b) > or > calc(directionally-sensitive-addition, a, b) More to the point would be something like calc(a + b, as percent) calc(a + b, as px) calc(a + b, as em) /* could make a difference when user resizes text without zooming whole page */
Received on Thursday, 2 February 2012 05:43:34 UTC