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

On Mon, Jan 23, 2012 at 11:28 AM, Brian Manthos <brianman@microsoft.com> wrote:
> I find this proposed behavior bizarre, personally.  I'm not sure I would fight against it yet (because I need to consider it some more), but on the surface it's very counterintuitive to me.
>
> For the example
>        Width: 200px;
>        Height: 400px;
>        Background-position: calc(100% - 5px) calc(100% - 10px);
>        Background-repeat: no-repeat;
>
> As I understand it, the computed value for background-position is something like
>        195px 390px
> with the upper left of the image at
>        (195px, 390px) from the upper-left origin
> as the Background specs currently stand.
>
> With the proposal below, a bunch of new confusing stuff pops out in both computed value and rendering.  Good luck with getting authors to have good results when inheriting values under such conditions.

Yes, that's a correct interpretation of the current spec behavior.

This is counter-intuitive given the traditional behavior of
percentages in bg-position, though.  It seems odd that
"background-position: 100% 100%" positions the image such that its
right and bottom edges are flush with the right and bottom edges of
the background area, but "background-position: calc(100% - 5px)
calc(100% - 5px)" positions the image such that its right and bottom
edges are way off beyond the right/bottom.  At minimum, you expect the
position of the image to shift by 5px in some direction, not several
hundred pixels.

~TJ

Received on Monday, 23 January 2012 19:39:14 UTC