- From: Brad Kemper <brad.kemper@gmail.com>
- Date: Fri, 3 Sep 2010 12:37:35 -0700
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: Simon Fraser <smfr@me.com>, www-style list <www-style@w3.org>
Brad Kemper On Sep 3, 2010, at 8:59 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote: > On Fri, Sep 3, 2010 at 7:59 AM, Simon Fraser <smfr@me.com> wrote: >> Glazou reminded me in a tweet of another good reason that we should >> strive to keep the different-behaving functions separate: the CSS OM. >> We need to design gradients such that the properties exposed in the OM >> are sensible, and behave predictably under modification. > > That's convincing. We just need a name, then. I'm hoping I can do > this without resorting to "linear2-gradient()"... > > >>> Using a combination of two positions and an angle is awkward, >>>> because one of the points may no longer lie on the gradient >>>> axis. That's why the point/angle/length combination seems more >>>> natural here. >>> >>> Hmm, maybe. If, as you say, we make percentages in the <length> refer >>> to the distance from the starting-point to the "line intersecting the >>> corner" point, and make it default to 100%, I think that could be >>> okay. >>> >>> I'd still want the starting-point to use the "corner in the opposite >>> direction of the angle" smarts if left out, though. >> >> I'm ok with both of those. > > Cool. Brad, what do you think? I think there is a way to ditch background position notation from gradients altogether, and make it simpler and more familiar to designers, who are accustomed to gradient directions as degrees when written textually. I have started writing up a fuller explanation if how this would work (in particular, to cover all common use cases, including corner-to-corner) and why, but haven't posted it yet. For me, if you want to have angle-direction-based gradients in one property, and bg-position-based gradients in another, the naming of the two would be something like "linear-gradient-simple" and "linear-gradient-overly-complex". I don't say this to denigrate the thought and work put into the spec so far, but I think it would be much better to find a way to just use angles (which should also help with the CSS OM issue), and I think I have that way. Will send fuller explanation soon.
Received on Friday, 3 September 2010 19:39:10 UTC