W3C home > Mailing lists > Public > www-style@w3.org > November 2012

Re: Request for css parent-percentage lengths

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 19 Nov 2012 09:49:48 -0800
Message-ID: <CAAWBYDCh0G+5T=LcnpJRP-LWN1gKkDdDv4N0pv9yckQEfBsuzw@mail.gmail.com>
To: 张立理 <otakustay@live.com>
Cc: "www-style@w3.org" <www-style@w3.org>, 吕康豪 <kanghaol@oupeng.com>
On Mon, Nov 19, 2012 at 9:35 AM, 张立理 <otakustay@live.com> wrote:
> I know normal percentage (%) could represents a percentage length of its
> parent, but ONLY to the related orientation.
> Now we have a simple task: to embed an iframe (or div, anything) into our
> content, we don’t know our parent’s width, however we are sure the iframe
> (div) should have a 4:3 in its width:height size.

It sounds like this (the iframe should have a 4:3 ratio) is the thing
you're actually trying to achieve.  This can be done much more easily
than parent-lengths, and without the horrible side-effects.

I have a proposal for an aspect-ratio property on my blog
<http://www.xanthir.com/blog/b4810> that I'm going to try and get into
the Sizing module (most likely, the next level of it), which will
solve your problem.

Received on Monday, 19 November 2012 17:50:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:23 UTC