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

I am referring to the pattern in Brian’s email. I think many folks will expect an expression like calc(100% -5px) to resolve at compute time
in background-position, just like it would when in width.

I specifically dispute the assertion that the reason it should not behave this way will be ‘intuitive’ to the average author. Especially when their
expectation will be met in some places but not others.

From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
Sent: Monday, January 23, 2012 8:58 PM
To: Sylvain Galineau
Cc: Brian Manthos; L. David Baron; www-style list; fantasai
Subject: Re: [css3-2d-transforms][css3-images] <position> grammar is duplicated or points to the wrong spec

On Mon, Jan 23, 2012 at 8:29 PM, Sylvain Galineau <sylvaing@microsoft.com<mailto:sylvaing@microsoft.com>> wrote:
> [Tab Atkins Jr.:
>> Nah, the (implicit) proposed solution patches calc() to work in the
>> intuitive way for <position>, so <percentage>s and <length>s are tracked
>> separately in calc() and then applied as two steps.
>
> Intuitive for whom? I'd love to see how many authors gets this one right.
> As noted in a separate thread, it is natural to think of CSS functions as
> JS functions, especially this one. I'm willing to bet you a bottle of wine
> in Paris* that most people will expect the exact results Brian expects.
>
> *: of my choice...

So you're saying that most people would expect this?

+------------+     +------------+
|    +------+|     |           +------+
|    |      ||     |           |      |
|    |      ||     |           |      |
|    +------+|     |           +------+
|            |     |            |
+------------+     +------------+
  left 100%          left calc(100%)

~TJ

Received on Tuesday, 24 January 2012 05:34:51 UTC