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

On Monday 2012-01-23 19:28 +0000, Brian Manthos 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

No, the computed value for background-position has both percentages
and lengths in it, just as it does today.  Percentages and lengths
in background-position have different meaning, and you can't convert
between them at the computed value level.  Computing equivalences
between them requires knowing the size of both the background
positioning area and the image.

> 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.

This is how background-position already behaves.

With any other approach, there would have to be differences in
behavior between some of the following:
  background-position: 75%
  background-position: calc(75%)
  background-position: calc(75% + 0px)
  background-position: calc(75% + 0.01px) /* other than the 0.01px offset */
or between analogous cases for lengths.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Monday, 23 January 2012 19:40:00 UTC