W3C home > Mailing lists > Public > www-style@w3.org > August 2011

RE: [css3-images] Resolving on gradient issues

From: Brian Manthos <brianman@microsoft.com>
Date: Thu, 4 Aug 2011 17:37:08 +0000
To: Brad Kemper <brad.kemper@gmail.com>, Tab Atkins Jr. <jackalmage@gmail.com>
CC: www-style list <www-style@w3.org>
Message-ID: <9710FCC2E88860489239BE0308AC5D17112285@TK5EX14MBXC264.redmond.corp.microsoft.com>
I think we've got general agreement that the "magic" rendering is better than the WD rendering.  As such, when corner-gradients-via-keywords is reborn we should probably shift to that -- probably for CSS4.

The syntax of corner-gradients-via-keywords was troubling enough that Tab recommend @ the F2F that we push the whole topic to CSS4 rather than begin another round of syntax discussions on the topic.  The general murmur in the room seemed to grudgingly agree, IMO.


I didn't code up the rendering adjustment discussed for 3 reasons: (a) IE10's prefixed corner-to-corner currently matches the February WD rather than some hybrid draft, (b) not committing coding resources to theories as opposed to official spec changes, and (c) as per the above it's likely pushed to CSS4 as part of moving CSS3 Gradients to CR.

A, B, and C noted -- it's fortunately a fairly straightforward algorithm when/if we do opt for it (in CSS4?).


Side-note: The cover/contain description aligns with what I was saying a few weeks ago about how the current radial syntax allows for closest/farthest side/corner (where two of them map to cover and contain) but linear doesn't offer such options.



Upward/Downward vs. Up/Down discussion - I have no strong opinion, except to say this is part of the reason why I argued that "left" is also a direction and thus "left" meaning "go away from left" is backwards and troubling.  But let's not reopen that discussion again.


> -----Original Message-----
> From: www-style-request@w3.org [mailto:www-style-request@w3.org] On
> Behalf Of Brad Kemper
> Sent: Thursday, August 04, 2011 9:57 AM
> To: Tab Atkins Jr.
> Cc: www-style list
> Subject: Re: [css3-images] Resolving on gradient issues
> 
> 
> On Aug 2, 2011, at 7:00 PM, Tab Atkins Jr. wrote:
> 
> > My preferred outcome for the linear-gradient keywords is to have them
> > remain as they are.  There is more possibility-space to explore here
> > in the realm of linear gradients, as recently pointed out by Behnam
> > Esfahbod in the "Gradient Magic" thread, and I would like to address
> > that in Image Values 4 with more time to put proper thought into the
> > matter.
> 
> I don't think you should punt on that idea. There is no good reason to
> leave it out of css3-images. It is simple to spec, always produces
> better looking results, and so far has been non-controversial.
> 
> I think Brian Manthos has it right in how he describes it. You
> basically just have to find the angle that joins the two corners as if
> the box had been turned 90deg first, and then use that on the unturned
> box as if the gradient line angle had been specified in that many
> 'deg'. The result is a gradient that acts more like a 'cover' than like
> a 'contain', just as Ndeg linear gradients do. I wouldn't expect
> authors to care about what math you used to get there, as long as the
> gradient connecting the corners looks reasonable. And I think this
> change makes it look much more reasonable, and I suspect most authors
> would agree when comparing rendered results.
> 
> I believe Brian said that IE10 would do this (has done this?) for their
> prefixed version, so it appears to be a fairly easy implementation
> change, and you will be able to compare their results with other
> implementation.
> 
> The other downside of punting on diagonals is that is makes 'downward',
> 'upward', etc. seem much more reasonable than they really are, because
> nobody then sees the awkward combinations for corners ('downward
> rightward', gaaaah!).
> 
> Person 1: "How do I get to Miami from Seattle?"
> Person 2 (waves hand indistinctly at a map of the US): "downward...
> rightward... you know, over that way."
> Person 1 (looking at person 2 like he is an idiot): "Never mind."
> 
> I know I said I'd go by what you chose, in order to avoid further
> argument, so I'm just saying. I expected a better considered choice
> from you. 95deg could be described as 'downward rightward', without
> coming close to describing an optimal path to connect corners, except
> in a tiny minority of cases.
> 
> P.S. "down" and "up" are already directions that are not confused with
> positions, and don't need 'wards' added to them.
Received on Thursday, 4 August 2011 17:37:38 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:43 GMT