Re: Gradient syntax proposal

On Fri, Aug 14, 2009 at 8:42 PM, Brad Kemper<brad.kemper@gmail.com> wrote:
>
>
> Sent from my iPhone
>
> On Aug 14, 2009, at 5:12 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>
>> would be equivalent
>> to linear-gradient(10px 10px to right 10px bottom 10px / white black)
>
> I have no idea what that would look like. What does 10px bottom 10px mean?

"right 10px bottom 10px".  It's a background-position.  10px from the
right, 10px from the bottom.

>> which is equivalent to linear-gradient(10px 10px to calc(100% - 10px)
>> calc(100% - 10px) / white black)
>
> Holy Mackeral! My head is going to explode! Who needs that much complexity?

Yeah, it's complex.  But it's no more complex than a background, since
it uses the same syntaxes.  That means that an author can apply the
knowledge they already have to this, or learn new details from this
and apply it back to backgrounds.  That sort of knowledge-sharing is
pretty cool!

> If I stare at this long enough I see that it starts 10px from top, 10px from
> left, and ends the same distance from the bottom right, correct?so why not
> this instead:
>
> Gradient(top-left / white 14px, black calc(100% - 14px))

Because the box may not be square, which would make your version not
equivalent to my versions.

~TJ

Received on Saturday, 15 August 2009 03:53:50 UTC