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

Re: [css3-images] radial-gradient issue raised by Brad

From: Brad Kemper <brad.kemper@gmail.com>
Date: Fri, 12 Aug 2011 18:28:20 -0700
Message-Id: <B8C79FEC-D986-45FC-AF6B-ADB2FB942D5B@gmail.com>
Cc: "www-style@w3.org" <www-style@w3.org>
To: Brian Manthos <brianman@microsoft.com>
I hope to have more to say about this soon, but nit quite ready to yet. 


Brad Kemper

On Aug 12, 2011, at 4:28 PM, Brian Manthos <brianman@microsoft.com> wrote:

> http://dev.w3.org/csswg/css3-images/#radial-gradients
> # Brad suggests that we could drop the position/sizing arguments
> # and just use background-position and background-size. This
> # would force all non-background uses of radial gradient to be
> # centered and box-filling. Is this acceptable or not?
> 
> The current grammar is:
> 
> <radial-gradient> = radial-gradient(
>    [<'background-position'>,]? 
>    [[
>        [<shape> || <size>]
>        |
>        [<length> | <percentage>]{2}
>    ],]? 
>    <color-stop>[, <color-stop>]+
> )
> <shape> = circle | ellipse
> <size> = closest-side | closest-corner | farthest-side | farthest-corner | contain | cover
> 
> 
> For a moment, let's ignore the first parameter and the stops.  Thus we have the following combinations:
> 1    circle closest-side = circle contain
> 2    circle closest-corner
> 3    circle farthest-side
> 4    circle farthest-corner = circle cover
> 5    ellipse closest-side = ellipse contain
> 6    ellipse closest-corner
> 7    ellipse farthest-side
> 8    ellipse farthest-corner = ellipse cover
> 9    <length> <length>
> 10    <length> <percentage>
> 11    <percentage> <length>
> 12    <percentage> <percentage>
> 
> As I understand it, the proposed grammar is:
> 
> <radial-gradient> = radial-gradient(
>    [<bg-position>,]? 
>    [<bg-size>,]?
>    <color-stop>[, <color-stop>]+
> )
> <bg-size> = [ <length> | <percentage> | auto ]{1,2} | cover | contain
> 
> Again, ignoring the first parameter and the stops, the following combinations are available:
> i    <length>
> ii    <length> <length>
> iii    <length> <percentage>
> iv    <length> auto
> v    <percentage>
> vi    <percentage> <length>
> vii    <percentage> <percentage>
> viii    <percentage> auto
> ix    auto
> x    auto <length>
> xi    auto <percentage>
> xii    auto auto
> xiii    cover
> xiv    contain
> 
> My initial thoughts of new syntax vs. old:
> A. [+1] Old has 16, new has 14. 
> B. [+2] Syntaxes 'i' and 'v' are added functionality, and potentially convenient.
> C. [-6] I'm unclear on the meaning or value of having the auto parameter (iv, viii, ix, x, xi, xii).
> D. [-1] No ability to distinguish ellipse vs. circle in cover (xiii vs 4, 8).
> E. [-1] No ability to distinguish ellipse vs. circle in contain (xiv vs 1, 5).
> F. [-2] Lost functionality for closest-corner (2, 6).
> G. [-2] Lost functionality for farthest-side (3, 7).
> 
> Tally that up: -9.
> 
> I strongly prefer the current syntax to the proposal.
> 
> 
> 
> 
Received on Saturday, 13 August 2011 01:28:55 GMT

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