W3C home > Mailing lists > Public > www-style@w3.org > October 2011

Re: [css3-images] simplifying radial gradients

From: L. David Baron <dbaron@dbaron.org>
Date: Tue, 11 Oct 2011 17:50:35 -0700
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Brad Kemper <brad.kemper@gmail.com>, Sylvain Galineau <sylvaing@microsoft.com>, Alan Gresley <alan@css-class.com>, Brian Manthos <brianman@microsoft.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <20111012005035.GA31673@pickering.dbaron.org>
On Tuesday 2011-10-11 09:58 -0700, Tab Atkins Jr. wrote:
> On Mon, Oct 10, 2011 at 2:32 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
> > On Oct 7, 2011, at 4:07 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
> >> Most of the patterns in Lea's gallery don't use any sizing or
> >> positioning at all, only color-stops, and so are equally doable with
> >> either the current syntax or Brad's suggested change. Β They would all
> >> need their color-stop positions divided by sqrt(2), though, as Brad's
> >> suggested default sizing behavior is "contain".
> >
> > IIRC, converting them is a matter of multiplying by 1.72 (or thereabouts).
> 
> 1.41, which is approximately sqrt(2).

Converting between 'contain' and 'cover' mathematically is only
possible for ellipse gradients; for 'circle' gradients there's no
single factor since the factor depends on the aspect ratio of the
box.

Unless we're also eliminating circle and making gradients
ellipse-only (where the ellipse is the shape that fits in the
background-size rectangle), I think we should keep 'contain' and
'cover'.  And I tend to think we should have circle gradients.

-David

-- 
π„ž   L. David Baron                         http://dbaron.org/   𝄂
𝄒   Mozilla                           http://www.mozilla.org/   𝄂
Received on Wednesday, 12 October 2011 00:51:10 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:05 UTC