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

Re: Gradients and background-repeat (Was: Re: Automatic spec annotations)

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 12 May 2011 13:23:31 -0700
Message-ID: <BANLkTikLcNBmCmcaGbX-k7rdZDthiyg=5g@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: Simon Fraser <smfr@me.com>, www-style list <www-style@w3.org>
On Thu, May 12, 2011 at 12:20 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
> On May 12, 2011, at 10:52 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>> Exactly, which is why I said "a property value tweaking the behavior
>> of certain values of another property".  Having a property tweak
>> particular types of values in another property is pretty bad.
>
> What other property? background-image? Oh, come on. Having an image that
> adapts its output so that two tightly integrated background properties can
> work together is not evil magic. SVG adapts its output resolution based on
> 'background-size', doesn't it? Is that magic bad too? When a linear-gradient
> with 'bottom left' in it adjusts its gradient angle based on the size from
> 'background-size' or 'width', how is that magic so much better than having
> linear-gradient with '30deg' in it adjust its gradient angle based on a
> single value in 'background-rotate'?

The other two are one property controlling some simple concept (the
size of the canvas), and then another thing (SVG, gradient) reacting
to that concept.  This is basic and simple, like a positioned element
using 'left' and 'right' positioning based on the width and position
of its containing block.

None of these involve something like "when this property is auto and
the image is a linear gradient, change the gradient's rotation to
0deg, then rotate equal to the gradient's original angle".  This is
roughly similar to the sort of contortions we're going through with
sub/superscript, which is a really bad and fragile thing, but
sufficiently useful that it can justify itself.


> I don't think you're giving my idea fair consideration, and I suspect the
> real reason you resist it so strongly is that you feel it competes with the
> repeating gradients properties that you've put time into. It has nothing to
> do with a distaste for "magic". What I've proposed is no more magic than
> many other things in CSS, including things that you've come up with, and is
> limited to the sort of tightly integrated workings of backgrounds.

I thought my reasoning was clear - I just don't think it's a very good
idea, in objective terms.  The fact that it's tightly integrated with
backgrounds is part of the badness.

Anyway, I'm not going to take this approach unless the WG overrides me.

~TJ
Received on Thursday, 12 May 2011 20:24:17 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:40 GMT