- From: Brian Manthos <brianman@microsoft.com>
- Date: Mon, 23 Jan 2012 20:00:20 +0000
- To: Tab Atkins Jr. <jackalmage@gmail.com>
- CC: "L. David Baron" <dbaron@dbaron.org>, www-style list <www-style@w3.org>, fantasai <fantasai@inkedblade.net>
Tab: > Both. David is correct that the computed value of bg-position > maintains percentages without converting them to lengths. It is also I wasn't suggesting that it they do. I was suggesting that calc's resolve to a single "value (+ unit)" when computed. Perhaps I'm wrong on that? > true that, given the current state of the calc() spec, > "background-position: 75%;" and "background-position: calc(75%);" > produce two very different positions. We agree on this point. But I don’t think the proposed solution makes it better. I think it makes the problem worse. The root issue, IMO, is the difference between these two DIVs: <html> <meta http-equiv="X-UA-Compatible" content="IE=10" /> <style> Div { width: 200px; height: 400px; background-image: url(http://www.w3.org/Icons/w3c_home); background-color: gray; background-repeat: no-repeat; } div:nth-child(1) { background-position: 25% 25%; } div:nth-child(2) { background-position: 50px 100px; } </style> <div> </div> <div> </div> </html> This is, arguably, a fundamental issue with how background-position is treated rather than the <position> grammar itself. -Brian -----Original Message----- From: Tab Atkins Jr. [mailto:jackalmage@gmail.com] Sent: Monday, January 23, 2012 11:52 AM To: Brian Manthos Cc: 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 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?
Received on Monday, 23 January 2012 20:01:15 UTC