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

Re: [css3-images] Gradient Magic

From: Behnam Esfahbod ZWNJ <behnam@zwnj.org>
Date: Tue, 19 Jul 2011 01:45:50 -0400
Message-ID: <CAPTpOH+Fbfj=pXnmWskfSbOUs8qorLHYisy-_XkTpkW5=+aCyg@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Brian Manthos <brianman@microsoft.com>, WWW-Style <www-style@w3.org>
> Well, the way I thought of it was to stretch a square to determine the
> length, angle, and placement of the gradient path. But still place the color
> stops along the final path within the final rectangle. What Behnam made me
> think though is that the final angle shouldn't be based on the path of the
> two gradient endpoints (45deg to connect two corners), but rather on a path
> perpendicular to the OTHER two endpoints. Once you resolve what the final
> used angle should be in degrees, you just treat it like those degrees were
> specified by the author.

Brad, that's exactly how I have implemented it, "prependicular to the
other two endpoints", but it worth noting that the result vector would
be mirror of the vector for "normal" mode based on one of y=x or y=-x

Now that I'm thinking more, a generalization of this would be allowing
basic math operations on the vectors, like "45deg - (bottom right)".

Thanks all for the comments,

    '     بهنام اسفهبد
    '     Behnam Esfahbod
  *  ..   http://behnam.esfahbod.info
 *  `  *  http://zwnj.org
  * o *   3E7F B4B6 6F4C A8AB 9BB9 7520 5701 CA40 259E 0F8B
Received on Tuesday, 19 July 2011 05:46:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:02 UTC