Re: [css3-images] simplifying radial gradients

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