Re: [css3-2d-transforms][css3-images] <position> grammar is duplicated or points to the wrong spec

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