Re: [gradients] basics

On Sat, Nov 7, 2009 at 5:41 PM, Simon Fraser <smfr@me.com> wrote:
> The current gradient proposals address the application of gradients to CSS images. This is not to say that these are the only types of gradients we would ever want in CSS; you could imagine border gradients, outline gradients, and perhaps even shadow gradients. But these would be separate properties, or new values for existing properties, which I don't believe would conflict with the current proposal.

Indeed.  There is no reason to assume that we'll never address the use
of generalized brushes in CSS, but that does *not* mean that the color
property is the best place to do so.  It isn't.  Colors are
intrinsically simpler than images - they have no dimension or
direction.  Gradients have both, because they're images.

>> If to think that gradient is such a background-image then we need to
>> define how such an image is affected by say:
>> background-size: ...;
>> background-attachment: ... | fixed | local;
>> background-repeat: ...;
>
> You are correct. Gradient images have no intrinsic size, so the behavior of these properties needs to be specified. At one point Gecko used background-repeat as an indication that it should paint a repeating gradient, but that is not in Tab's current proposal.

I don't understand how this is unclear.  If these properties have
undefined interactions with images lacking intrinsic sizes, then the
problem lies in CSS2.1.  It is not appropriate to define that
treatment here.

>> And second paragraph:
>> "In many places this specification references a box, such ...."
>> definitely requires more formal specification. E.g. "would be filled
>> by an SVG image" is just sort of guess or appellation to
>> reader's intuition.
>
> Agreed, this could be improved.

Again, I don't know how this is unclear, or how it relies on any sort
of intuition.  CSS2.1 is clear about how to size an image without
intrinsic dimensions; if it's not, the definition needs to be fixed
*there*.  File a bug on it if you feel it is underdefined.

~TJ

Received on Sunday, 8 November 2009 14:55:59 UTC