- From: L. David Baron <dbaron@dbaron.org>
- Date: Mon, 23 Jan 2012 11:56:52 -0800
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: Brian Manthos <brianman@microsoft.com>, www-style list <www-style@w3.org>, fantasai <fantasai@inkedblade.net>
On Monday 2012-01-23 11:52 -0800, Tab Atkins Jr. wrote: > On Mon, Jan 23, 2012 at 11:49 AM, Brian Manthos <brianman@microsoft.com> wrote:> > > From: L. David Baron [mailto:dbaron@dbaron.org] > >> 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. > > > > I was talking about "as it does today". It's unclear to me from your answer whether you're agreeing with me (as Tab seems to have been in his reply) or not. Can you please elaborate? > > Both. David is correct that the computed value of bg-position > maintains percentages without converting them to lengths. It is also > true that, given the current state of the calc() spec, > "background-position: 75%;" and "background-position: calc(75%);" > produce two very different positions. If that's true, that's a mistake in the calc() spec (which was written after I implemented this). It shouldn't be hard to fix. -David -- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla http://www.mozilla.org/ 𝄂
Received on Monday, 23 January 2012 19:57:24 UTC