- From: Brian Manthos <brianman@microsoft.com>
- Date: Tue, 7 Jun 2011 18:34:59 +0000
- To: "www-style@w3.org" <www-style@w3.org>
Something was bugging me about the linear gradient keywords, and I think I narrowed it down. The same issue applies to the Working Draft and the Editor's Draft. For now, let's use the Working Draft: http://www.w3.org/TR/css3-images/ # The gradient-line may be specified in two different ways. The # first is by specifying the angle the gradient-line should assume; # this uses the standard algebraic notation for angles where 0deg # points to the right, 90deg points up, and positive angles go # counterclockwise. The starting-point and ending-point of the # gradient-line are determined by extending a line in both # direction from the center of the box at the angle specified. # [1]In the direction of the angle, the ending-point is the point on # the gradient-line where a line drawn perpendicular to the # gradient-line would intersect the corner of the box in that # direction. The starting-point is determined identically, except # in the opposite direction of the angle.[/1] # # The [2]second way is to simply provide a side or corner of the box # that the gradient should start[/2] at; the gradient will then # automatically angle itself to [3]extend from the specified side or # corner to the opposite[/3] side or corner in a straight line. To be # precise, the gradient is converted to the angle form described # in the previous paragraph at used-value time. If a 'left', # 'bottom', 'right', or 'top' is given, the used value of the gradient # is 0deg, 90deg, 180deg, or 270 deg, respectively. If a corner is # given, the used value of the gradient is the angle necessary to # place the starting-point of the gradient in that corner of the box. Paraphrasing [1]: When specified via angle, the angle can be understood as both the direction ("toward the <angle>") and the ending point ("ends at <angle>"). Paraphrasing [2] and [3]: When specified via keyword, the keyword can be understood as both opposite direction ("away from the <keyword(s)>") and the starting point ("starts at <keyword>"). Is it intentional that these two ways of specifying gradient-line are opposite?
Received on Tuesday, 7 June 2011 18:35:31 UTC