- From: Brendan Kenny <bckenny@gmail.com>
- Date: Fri, 6 Nov 2009 14:13:44 -0600
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: fantasai <fantasai.lists@inkedblade.net>, Brad Kemper <brad.kemper@gmail.com>, Simon Fraser <smfr@me.com>, www-style list <www-style@w3.org>
On Fri, Nov 6, 2009 at 1:55 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote: > On Fri, Nov 6, 2009 at 11:34 AM, Brendan Kenny <bckenny@gmail.com> wrote: >> 1. An angle, a start point and a length >> or >> 2. An angle, which forms an assumed axis covering the entire box and >> color stops (including beginning and end) as lengths along that axis. >> Without lengths it could be assumed we start at 0% and end at 100%. >> >> I'm torn on which seems better. (1) would give an author more obvious >> control (without having to do any napkin calculations to find >> percentages they want) > > I'm okay with requiring basic napkin calculation to handle the case of > knowing what %s you want the stops to be at *and* knowing what length > you want the entire gradient to be. That's a trivial enough > calculation (I want a 25% stop in a 260px gradient, so 260 * .25 = > 65px) that I don't think it's a problem we need to solve. It's when > an author has to do trig to solve reasonably common cases that we have > a problem. > >> but, given the limited use cases ("I just want >> a gradient at this angle"), (2) might make more sense in its >> simplicity. > > Can we recall what the use-case was for angle+point in the first > place? It would, I think, simplify the mental model of things > considerably if that can be dropped. Then you'd have only three ways > of specifying a gradient - angle, point, and default, and all three > will work intuitively. > > ~TJ Ah, a closer reading of your proposal shows that what I call (2) above is exactly what you already proposed in your <angle> paragraph. At first read through I had thought you were suggesting that the angle just specifies that the starting point snaps to the closest corner, and that was its only functionality. A diagram here would clear up a lot. Simplifying to the three cases you give (point, angle, default) would seem to make the most sense. The dual <bg-position> and <angle> form could be eliminated, as it can be easily specified by an angle and a first color stop calculated in the fashion you mentioned above. Would (point [, point]?), angle, default work and not add to the confusion of this discussion? From what has been said it seems like specifying an end point makes the most sense to some.
Received on Friday, 6 November 2009 20:14:18 UTC