- From: Simon Fraser <smfr@me.com>
- Date: Tue, 14 Jun 2011 16:42:08 -0700
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: www-style list <www-style@w3.org>
On Jun 14, 2011, at 3:43 PM, Tab Atkins Jr. wrote: > > > There are some alternate approaches to this problem that solve the > discrepancy in different ways. > > 1. Drop the keywords entirely, and just use angles. If you want a > corner-to-corner gradient, just estimate what angle it will be. It's > relatively difficult to tell apart most gradients that differ by only > 10 or 15 degrees, which seems like a reasonable accuracy to ask > authors to estimate within. (The spec has an example distinguishing a > 45deg gradient from a corner-to-corner gradient in a box with a 2:1 > width:height ratio, which is a difference of about 20deg. The two > gradients look roughly the same.) > > 2. Drop the keywords entirely, and instead using an optional > "as-square" keyword alongside angles. This would first resolve the > angle as normal against a square canvas, then scale the canvas to its > proper size, scaling the relative positions of the gradient endpoints > as well. This way, a corner-to-corner gradient can be achieved by > specifying "45deg as-square" - 45deg produces a corner-to-corner > gradient if the canvas is square, and then the endpoints are held > steady in the corners when the canvas is scaled to its proper size. > > 3. Drop the keywords, and add an optional "snap" keyword alongside > angles. This would change the used value of the gradient to make the > angle point exactly at the corner in the same quadrant as the angle. > For example, "45deg snap" would always point toward the top-right > corner, no matter what the box dimensions are. So would "20deg snap" > or "89deg snap". Integer multiples of 90deg would be left unchanged. > > And then, just to give us numbers for everything: > > 4. Keep the keywords how they are (current WD wording). > > 5. Reverse the meaning of the keywords (current ED wording). > > > My preferences are, in order, 3 > 1 > 5 > 4 > 2. My preferences: 4 >>> 5 > 2 > 3 > 1 In my quick Twitter straw poll, everyone, without exception, said that linear-gradient(left, black, white) would have black on the left, so 'left' denotes the start point. There was zero confusion on this issue, which provides support for #5 and demotes #4. #1 is lame because it makes corner-to-corner gradients hard under varying box size. #2 is too complex and would confuse most authors. If they specify 45deg, it should be 45deg independent of box size. This confusion of starting point vs. angle is specious.
Received on Tuesday, 14 June 2011 23:43:15 UTC