- From: Simon Fraser <smfr@me.com>
- Date: Fri, 17 Jun 2011 10:54:08 -0700
- To: Brian Manthos <brianman@microsoft.com>
- Cc: Brad Kemper <brad.kemper@gmail.com>, divya manian <divya.manian@gmail.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
On Jun 17, 2011, at 10:34 AM, Brian Manthos wrote: > I'm not clear who's saying which in the original mail, perhaps we need a W3C spec for e-mail applications. > > I'll try to address the assertions generally. > > >> I also think CSS authors are familiar by now of the top, right, bottom, left keywords. This intuitively suggests the beginning position. > > You're welcome to that position. I disagree. For linear gradients, the three key elements are color stops and {start, stop} locations. The current syntax (WD, ED 1.08, and ED 1.07) choose to omit either the start or stop location. In the absence of that, an "almost as expressive" alternative is to treat the two key elements as color stops and direction. As an expression of direction, the keyword syntax prior to 1.08 is opposite that of the angle syntax in expressing direction -- fixed in ED 1.08 version. > >> Using the 'to' keyword would beg the question, why there is no equivalent 'to' keywords elsewhere in CSS (also should there be a 'from'?). > Perhaps this is an oversight, perhaps it's because gradients represent some new concept. > > Perhaps it's because the "to" keyword is imbedded in abbreviations such as "LTR" and "RTL". > http://dev.w3.org/csswg/css3-writing-modes/#direction > > If you prefer the "precedent must be correct" approach to design, then perhaps we should use the following: > LTR RTL TTB BTT etc. > >> I think it introduces additional complexity that could be avoided. > Apparently it can't be avoided, because there are enough people that prefer "to right" over "rightwards" or "right" (as end point). > >> In my view, this: >> linear-gradient(top left indianred, 50% midnightblue, right mistyrose); >> would be something that would be understandable, given we make similar >> assumptions of default keyword values for background-position >> http://dev.w3.org/csswg/css3-background/#the-background-position > > Once again, the position argument returns. Unless you are expressing two positions, you haven't expressed a direction. So the argument that you can omit one and be clear is incorrect. Not at all. The spec is very clear about this: "The second way is to simply provide a side or corner of the box that the gradient should start at; the gradient will then automatically angle itself to extend from the specified side or corner to the opposite side or corner in a straight line." I dont see why this is hard to understand. If you use the keywords, you're specifying the starting point of a vector that passes through the center. If you use the angle form, you're specifying a vector through the center with the given angle. In both cases, the end points of the gradient are specified in the same way (explained by the figure in Example VII). > >> linear-gradient(top left indianred, 50% midnightblue, right mistyrose); > This seems cumbersome because you now have two places to spec start and stop locations and there's now a blending with stop location and end point. > > This is a bit more acceptable in my book: > linear-gradient(top left, indianred, 50% midnightblue, mistyrose, right); > > But it's not quite there, because it's introducing a new case that the spec currently doesn't deal with "top left to right". Avoiding that for now you get... > linear-gradient(top left, indianred, 50% midnightblue, mistyrose, bottom right); > or > linear-gradient(top, indianred, 50% midnightblue, bottom); > and prior discussion on this thread had (to my recollection) pushed back on the "specifying both start and end point" as cumbersome. "top left to right" is not dealt with in the spec because it's redundant. Such a gradient is horizontal, so there is no need to specify "top"; it's equivalent to "left to right". Simon
Received on Friday, 17 June 2011 17:54:44 UTC