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

RE: [css3-images] Making gradients readable

From: Brian Manthos <brianman@microsoft.com>
Date: Fri, 4 Nov 2011 01:15:26 +0000
To: Brad Kemper <brad.kemper@gmail.com>
CC: "L. David Baron" <dbaron@dbaron.org>, fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <9710FCC2E88860489239BE0308AC5D170444E70A@TK5EX14MBXC266.redmond.corp.microsoft.com>
That doesn’t work.  In that syntax you’re elevating “with” to have the same “separator strength” as the commas, which thus makes “with” special and different relative to the keywords to its left in <optional-parameters>.

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




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.

-Brian

From: Brad Kemper [mailto:brad.kemper@gmail.com]
Sent: Thursday, November 03, 2011 5:54 PM
To: Brian Manthos
Cc: L. David Baron; fantasai; www-style@w3.org
Subject: Re: [css3-images] Making gradients readable



On Nov 1, 2011, at 3:44 PM, Brian Manthos <brianman@microsoft.com<mailto:brianman@microsoft.com>> wrote:
Another reason is that I see the general syntax as:
   <gradient-type>-gradient([<optional-parameters> ,] <color-stop>[, <color-stop>]+)
where <gradient-type> is either "linear" or "radial" for CSS3, and <optional-parameters> resolves to one of
   <linear-optional-parameters>
   <radial-optional-parameters>

I don't feel strongly about whether it should be a keyword or a comma in that place, but a keyword there doesn't preclude it from being a keyword in both. Frex:

 <gradient-type>-gradient([<optional-parameters> with] <color-stop>[, <color-stop>]+)


Received on Friday, 4 November 2011 01:15:54 GMT

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