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

Re: magic corner gradient revisited

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 9 Aug 2011 08:04:46 -0700
Cc: Brian Manthos <brianman@microsoft.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, fantasai <fantasai.lists@inkedblade.net>, www-style list <www-style@w3.org>
Message-Id: <21E4FAEC-E587-4455-A490-0A39D0AD66D3@gmail.com>
To: Behnam Esfahbod ZWNJ <behnam@zwnj.org>

On Aug 8, 2011, at 11:57 PM, Behnam Esfahbod ZWNJ wrote:

> Brian,
> Thanks, but I lost the track of the discussion and ain't sure what your phrase meant to express.
> But please let me note that I'm in favour of not changing the current behaviour of corner gradients, because of two reasons.

Well, that complicates the discussions a bit, but thank you for the input.

> First, the current spec is already implemented in many platforms and this feature might be already in use by the platforms (like Mozilla) internally and/or externally. Changing this behaviour may cause either a big incompatibility between versions of these platforms, or introduce a lot of complexity to the platform just to keep the new ones compatible.

No, it is only implemented experimentally, under a prefix. It is done so specifically so that it can be changed if the spec changes.

And more practically speaking, even if there is another -moz- prefixed version to replace the old one, the result will not be an incompatible gradient that breaks layouts and designs. It will be diagonal gradients that suddenly look better, more like they should have to begin with. [IMO]

> Second, we should respect that "connecting corners" has a well-defined meaning for (professional) designers, thus changing the current behaviour will be confusing for them in some degree,

As a professional designer myself, I disagree. I want to be able to connect the corners in the way that looks best, without having to think too much about the mathematics required to determine what "best" means. Sure, I can connect two corners in a more naive way in PhotoShop, but it doesn't produce results that are as good as this, and at the end of the day it is the results that matter.

> and probably more important, inconsistent with some graphic applications.

In what way that matters?

> The later is why I proposed introducing a new keyword for this matter in the first place.

I am against complicating the syntax with additional keywords that force the author to make such an esoteric choice, when one choice virtually always produces better, more satisfactory results. One of the best things about linear-gradient, which I believe helped spread its adoption in a way that the old '-webkit-gradient' didn't, is its simplicity. Adding on non-transitionable switches (or worse, adding on a bunch of even more complex syntax to aid in transitions and animations) for things most authors won't need that level of control over, is exactly the wrong direction to go, IMO.

> -Behnam
> On Tue, Aug 9, 2011 at 12:24 AM, Brian Manthos <brianman@microsoft.com> wrote:
> I looked at this some more.  The first time I didn't notice this phrase in the right light...
> "line drawn perpendicular to the gradient-line through the center"
> While I prefer the simple "here's the math" approach, I think this might work.
> Brad, can take a look and see if it works for you?
> Behnam should probably take a look as well since he opened the original "Gradient Magic" thread.
> -Brian
> > -----Original Message-----
> > From: www-style-request@w3.org [mailto:www-style-request@w3.org] On
> > Behalf Of Brian Manthos
> > Sent: Monday, August 08, 2011 6:42 PM
> > To: Tab Atkins Jr.
> > Cc: Brad Kemper; fantasai; www-style list
> > Subject: RE: magic corner gradient revisited
> >
> > # If the argument specifies a corner to angle towards, the gradient
> > must be rendered identically to an angle-based gradient with an angle
> > chosen such that the endpoint of the gradient is in the same quadrant
> > as the indicated corner, and a line drawn perpendicular to the
> > gradient-line through the center of the box intersects the two
> > neighboring corners.
> >
> > This phrasing doesn't narrow down the angle that must be used.  In
> > fact, pretty much any angle in the quadrant satisfies the specified
> > criteria.
> >
> > If you don't like my slope description (from Tue 7/26/2011 12:17 PM
> > PST), I can provide an alternative involving around-center rotation of
> > the box by 90 degrees.
> -- 
>     '     بهنام اسفهبد
>     '     Behnam Esfahbod
>    '      
>   *  ..   http://behnam.esfahbod.info
>  *  `  *  http://zwnj.org
>   * o *   3E7F B4B6 6F4C A8AB 9BB9 7520 5701 CA40 259E 0F8B
Received on Tuesday, 9 August 2011 15:05:16 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:48 UTC