W3C home > Mailing lists > Public > www-style@w3.org > August 2009

Re: [CSSWG] Minutes and Resolutions 2009-08-12

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 13 Aug 2009 16:46:45 -0500
Message-ID: <dd0fbad0908131446k15f60a89nee98764210179f7f@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: "robert@ocallahan.org" <robert@ocallahan.org>, fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
On Thu, Aug 13, 2009 at 4:34 PM, Brad Kemper<brad.kemper@gmail.com> wrote:
> On Aug 13, 2009, at 1:43 PM, "Robert O'Callahan" <robert@ocallahan.org>
> wrote:
>> Being able to specify an angle is reasonable. However, if you want a
>> linear gradient to go from one corner of the box to another, for example,
>> and you don't know the size of the box, then you can't use an angle, or if
>> you do know the size of the box, then you have to do some trigonometry.
>
> I don't see how that is true. The corner is implied by the angle, and once
> you have that it is the same math as defining a stop from keywords like "top
> left" or "bottom right" or whatever.

I think you're misunderstanding.

Say you have a box filled with an arbitrary amount of content.  It may
be 500px by 500px, or it may be 500px by 2000px.  You don't know, and
there's no way *of* knowing beforehand.  You want a gradient to go
from the top-left to the bottom-right.

In this case, it is impossible to use an angle, because the necessary
angle changes based on the box's height.

Now, say you have a box which has a definite height: 300px wide by
524px high.  You want a gradient to go from the top-left to the
bottom-right.  What's the angle that you need?  This requires some
trig to calculate.

Being able to specify an angle is indeed nice, but it's far from
sufficient for common cases.

~TJ
Received on Thursday, 13 August 2009 21:47:40 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:20 GMT