W3C home > Mailing lists > Public > www-style@w3.org > August 2009

Re: Gradient syntax proposal

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 14 Aug 2009 22:52:56 -0500
Message-ID: <dd0fbad0908142052l62dcceb3n8f583e6f66e6c57c@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
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.

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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:38 UTC