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

Re: [css3-images] simplifying radial gradients

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 13 Oct 2011 13:18:05 -0700
Message-Id: <0532ABFE-55C5-4D85-87DA-A88124EB84D9@gmail.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "L. David Baron" <dbaron@dbaron.org>, Sylvain Galineau <sylvaing@microsoft.com>, Alan Gresley <alan@css-class.com>, "www-style@w3.org" <www-style@w3.org>
To: Brian Manthos <brianman@microsoft.com>
On Oct 13, 2011, at 10:25 AM, Brian Manthos <brianman@microsoft.com> wrote:

> Use case:
> 1. Web author makes or inherits a webpage with a gradient in a PNG or BMP file.
> 2. Web author's site owner wants to improve performance / load on the server.
> 3. Web author tries to replace url(gradientrasterized.png) with radial-gradient(...).
> RESULT: Works only if the radial gradient is centered.

Or has it's center aligned with a side or corner, in my most recent proposal. 

> That's a failure case.

You are considering it a failure, because you think CSS should be able to reproduce any conceivable gradient, no matter how complex. I do not feel the same. I think there is value in CSS being simple and easy to learn, which has always been one of it's virtues compared to SVG. 

What if the PNG is a little 3D heart shape, with some soft highlights and shadows in it. Is it imperative that CSS gradients always be able to draw it? Is it a failure otherwise? If the file name of the PNG is 'gradientHeart.png' does that mean CSS gradients has to be able to recreate it? You have to draw the line somewhere between what is possible and what belongs to other image-drawing functions where expressiveness always trumps human readability of the code. Like SVG, or like font data. 
Received on Thursday, 13 October 2011 20:18:42 UTC

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