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

Re: [css3-images] simplifying radial gradients - Lea Verou gallery

From: Brad Kemper <brad.kemper@gmail.com>
Date: Mon, 10 Oct 2011 14:31:44 -0700
Cc: Brian Manthos <brianman@microsoft.com>, Sylvain Galineau <sylvaing@microsoft.com>, Alan Gresley <alan@css-class.com>, "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
Message-Id: <A666768F-B998-40BD-92E4-80D800BF56C2@gmail.com>
To: Simon Fraser <smfr@me.com>

On Oct 10, 2011, at 10:44 AM, Simon Fraser wrote:

> On Oct 8, 2011, at 4:00 PM, Brad Kemper wrote:
>> On Oct 8, 2011, at 2:11 AM, Brian Manthos wrote:
>>> You are incorrect.  Your proposal doesn't *directly* support *in gradients* the expressed capabilities.  Gradients are supported as a flavor of <image> which is exposed by CSS3 Images more broadly than just backgrounds.  As such, using background properties to simulate behavior is an apples to oranges comparison.
>> It has always been my contention that <bg-position> inside the gradient is mostly redundant to using background-position, because the vast majority of use cases and needs for radial gradients are within backgrounds. The fact that you could also conceivably use them as bullet points or carefully constructed border images is almost (not quite, but almost) incidental, and doesn't demonstrate a need for extra complexity for that limited extra use. If we are optimizing for a particular use case, it should be for use in backgrounds.
> I have to disagree on this point. I think generated images are going to see more and more use cases outside background-image, with filters etc. in the pipeline. For this reason, I think that positioning should be in the radial gradient syntax.

I'm not familiar with the plans to use generated images in filters, etc., but wouldn't the need to be able to size, clip, and position for other types of images be just as needed anyway?

If we ever have the ability to put use a gradient as a 'content' value, wouldn't we also be able to size it, move it around, and clip/crop it? Don't we already have adequate properties for doing that?

> I also think that we should follow "make simple things easy, make hard things possible" rule. If the extra complexity added by allowing positioning in the radial gradient syntax doesn't complicate the most common use cases, then I see no reason not to have it.

One of my concerns is that I would not like us to make easy things incomprehensible. When I was reviewing Lea Verou's gallery, I was struck by how several of them were very hard to understand what was happening, and how they could have been simplified and combined with familiar background properties. Some did use background-position while others used positioning within the image, with no clear reason to do so ("hearts" was like that). Yet every single example was already using 'background-size', and so already could have done much of the sizing and positioning without extra parameters for the image. The only ones that couldn't were those that did clipping of the gradient.
Received on Monday, 10 October 2011 21:32:23 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:51 UTC