- From: Brendan Kenny <bckenny@gmail.com>
- Date: Fri, 6 Nov 2009 13:34:12 -0600
- To: fantasai <fantasai.lists@inkedblade.net>
- Cc: Brad Kemper <brad.kemper@gmail.com>, Simon Fraser <smfr@me.com>, www-style list <www-style@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
On Fri, Nov 6, 2009 at 1:07 PM, fantasai <fantasai.lists@inkedblade.net> wrote: > Brad Kemper wrote: >> >>>> http://www.bradclicks.com/cssplay/simpler_gradient.png >>>> >>>> And then, since this "image" is really dimensionless (not necessarily >>>> square in usage), the angle and fixed distances would be free to resize and >>>> and become different angles, just as they would if this was an EPS file (if >>>> the UA supported EPS). >>> >>> Wait, you're suggesting that if the author specifies an angle, it might >>> not use that angle if the gradient is drawn into a box with a different >>> aspect ratio? That seems counter-intuitive. >> >> If I resize any other image in a browse or any other software, the >> contents also resize to the new dimensions, no matter how distorted >> (assuming the software allows me to change the aspect ratio of the image). >> As the aspect ratio changes, so does the angle of any lines in the image >> (except for multiples of 90deg). That is totally intuitive. >> >> So, if you just assume a square when specifying the angle, the results of >> fitting the square to other aspect ratios is completely predictable. It >> bcemes exactly like an eps file in a page layout program > > I strongly disagree with disregarding the angle here. If I specify an > angle, I should get that angle, not some random transformation of it > depending on the size of the box. If I want the gradient to size with > the box, then I should specify it in start and end points because those > are defined to be relative to the box. > >> In the cases where you want something else, then you are asking for magic, >> something that makes this different from most other images. I say do ghat >> with a keyword. > > Changing the angle when I give an angle is considerably more "magic" > than actually drawing the angle I specified. > > ~fantasai > Agreed. If the author wants the more sophisticated behavior of an angle changing to match the aspect ratio of a box, they should be able to take the step of specifying end points in percentages (or with keywords). That's the whole point of percentage lengths. Simon has me convinced that the angle form will be the least useful form, but I think there is still an argument for it since it is, conceptually, the most simple ("I want a 35 degree gradient." Boom). The sticking point of it is really the end points needed for that form. A specified angle limits you to one degree of freedom: movement along a line rotated at that angle. Two numbers per end point is redundant (hence the complexity of "start the gradient at this point, end it on a point on a line perpendicular to the original line coinciding with the specified end point..."). If using the angle form, I think it makes sense to specify: 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) but, given the limited use cases ("I just want a gradient at this angle"), (2) might make more sense in its simplicity.
Received on Friday, 6 November 2009 19:34:47 UTC