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

Re: [css3-images] Making gradients readable

From: Brad Kemper <brad.kemper@gmail.com>
Date: Fri, 4 Nov 2011 08:31:01 -0700
Cc: "L. David Baron" <dbaron@dbaron.org>, fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
Message-Id: <30B5B7A6-3512-4070-8C76-94269037BD57@gmail.com>
To: Brian Manthos <brianman@microsoft.com>

On Nov 3, 2011, at 6:15 PM, Brian Manthos wrote:

> That doesn’t work. 

It could.

> In that syntax you’re elevating “with” to have the same “separator strength” as the commas,

Just as we are taking about doing with the commas currently within  <optional-parameters>.

> which thus makes “with” special and different relative to the keywords to its left in <optional-parameters>.

The keywords in  <optional-parameters> separate values. The separator before <color-stop-list>  separates it from  <optional-parameters>. There is nothing engraved in stone that says it has to be a comma.

> David’s mail on Tuesday (3:36PM) captures one aspect of that concern of comma vs. keyword in that location.  See examples below.
> Another aspect is that it’s easy to have the specification (now or later) allow optional parameter reordering…
>                 <optional-parameters> = <aaa> || [bbb <ccc>] || [ddd <eee>]
> But when you marry that with the containing syntax…
>                 diamond-gradient(<aaa> bbb <ccc> ddd <eee> with red, blue)
> … grouping the color stops moves from “desirable” to “pretty much required”:
>                 diamond-gradient(<aaa> bbb <ccc> ddd <eee> with (red, blue))

I didn't follow that, but I would always expect the color stop list to occur at the end, given that it is the only part that has no limit to the number of items in it. Thus, the items that are truly part of a list are separated by commas, and the non-list parameters are not. This is consistent with how commas are typically used in other CSS values.

> Example 1 grammar:
>                 vortex-gradient(<polarity> keyword1 <rate> keyword2 <extents> with red, blue);
> Example 1 value:
>                 vortex-gradient(alpha beta gamma delta epsilon with red, blue);
> Formatting 1:
>                 vortex-gradient(
> alpha beta gamma delta epsilon with red,
> blue);
> Example 2 grammar:
>                 vortex-gradient(<polarity> keyword1 <rate> keyword2 <extents> , red, blue);
> Example 2 value:
>                 vortex-gradient(alpha beta gamma delta epsilon, red, blue);
> Formatting 2A:
>                 vortex-gradient(
> alpha beta gamma delta epsilon,
> red,
> blue);
> Formatting 2B:
>                 vortex-gradient(
> alpha beta gamma delta epsilon
> , red, blue);
> Formatting 1 looks awful to me and is indicative of the specialness of “with” here.
> Formatting 2A & 2B look fine to me.

Sorry, but they all look like gibberish to me. I really don't understand your examples. Separating the list of color stops with something other than a comma looks best to me, because the list already has commas separating its items. It does not add clarity to have an additional comma occur nowhere else, except occuring just before the list too.
Received on Friday, 4 November 2011 15:31:43 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:52 UTC