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

RE: [css3-images] Summary of recent gradient issues

From: Brian Manthos <brianman@microsoft.com>
Date: Fri, 17 Jun 2011 17:34:53 +0000
To: Brad Kemper <brad.kemper@gmail.com>, divya manian <divya.manian@gmail.com>
CC: Tab Atkins Jr. <jackalmage@gmail.com>, Simon Fraser <smfr@me.com>, www-style list <www-style@w3.org>
Message-ID: <9710FCC2E88860489239BE0308AC5D1703A0F3@TK5EX14MBXC264.redmond.corp.microsoft.com>
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.  

> 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.

> Another example is 'vertical-align:top' versus 'vertical-align:5px'.
> With the unit measurements, it is understood to be "from the baseline".
> With the keywords, it is essentially "from the edge described by the
> keyword" (as in linear-gradient working draft). I've never heard of
> this causing even the slightest confusion, and I rather have
> consistency with these than to try to build in some sort of new link
> between the starting alignment keyword and the unit measurements.
>
> Far more confusing is trying to understand the difference between
> 'vertical-align:top' vs. 'vertical-align:text-top'. If you can learn
> that, then you can also learn that 'left' is a starting position
> for linear-gradient and not an end position.

My interpretation: "Weird, confusing stuff happens in other parts of CSS, so that should be precedent for doing more of it."

I disagree completely.
Received on Friday, 17 June 2011 17:36:01 GMT

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