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

Re: Fwd: Re: [CSSWG] Minutes and Resolutions 2009-08-12

From: François REMY <fremycompany_pub@yahoo.fr>
Date: Fri, 21 Aug 2009 15:12:58 +0200
Message-ID: <A18054D9D78B4F8CAE992AD3892595A2@FREMYCOMPANY>
To: <www-style@w3.org>, "Bert Bos" <bert@w3.org>
Thanks for reposting it. I wondered why the mail didn't appear in the list. 
So, this
is the attachements that made the message too large. I'll need to remember 
that.

In between, the discussion has continued to progress, I doubt my message 
will
be useful now.

BWT, the correct definition of my proposal seems to be :
>    gradient: <gradienttype> [<gradientcolors>]?
>
>        <gradienttype> : <linear> | <radial> | <square> | ...
>        <linear> : 'linear(' <point> ',' (<point> | <angle>) ')'
>                // The first point is 'from' and second is 'to', if the
> second argument is an angle
>        <radial> : 'radial(' <point> ',' <point> ')'
>                // First point is 'center of the radial' and second is a
> point of the 100% circle
>        ...
>
>        <point> : ('top' | 'bottom')? <length>? ('left' | 'right')? 
> <length>?
>                            // top left is by default;top 10% right 5%
> is the point
>                            located at 10% of the top and 5% of the end
> of the gradient image
>        <lenght> : Or should it be <percentage> ?
>
>        <gradientcolors> : <color>, [<length> <color>, ]* <color>
>                            // First is always at 0%, last at 100%

But as the new syntax has to be an image generator, it would at least
be better to have :
>        <gradienttype> : <linear> | <radial> | <square> | ...
>
>        <linear> : 'linear-gradient(' <point> ',' (<point> | <angle>) ',' 
> <gradientcolors> ')'
>
>                // The first point is 'from' and second is 'to', if the
>               second argument is an angle
>
>        <radial> : 'radial-gradient(' <point> ',' <point> ',' 
> <gradientcolors>  ')'
>
>                // First point is 'center of the radial' and second is a
>                point of the 100% circle
>        ...
>
>        <point> : ('top' | 'bottom')? <length>? ('left' | 'right')? 
> <length>?
>
>                            // top left is by default;top 10% right 5%
>                             is the point located at 10% of the top and 5%
>                             of the end of the gradient image
>
>        <lenght> : Or should it be <percentage> ?
>
>        <gradientcolors> : <color> ',' [<length> && <color> ',' ]* <color>
>                            // First is always at 0%, last at 100%

That would give a result like :

    background-image:
        linear-gradient(
            50% 50%,
            100% 75%,
            white,
            rose 25%,
            red
        )
    ;

--------------------------------------------------
From: "Bert Bos" <bert@w3.org>
Sent: Friday, August 21, 2009 2:26 PM
To: <www-style@w3.org>
Subject: Fwd: Re: [CSSWG] Minutes and Resolutions 2009-08-12

> [The message was too large. For the whole message with attachments, see
> http://lists.w3.org/Archives/Public/www-archive/2009Aug/0061.html
> - Bert]
>
> ----------  Forwarded Message  ----------
>
> Subject: [Moderator Action (size limit exceeded)] Re: [CSSWG] Minutes and
> Resolutions 2009-08-12
> Date: Thursday 13 August 2009
> From: François REMY <fremycompany_pub@yahoo.fr>
> To: "Tab Atkins Jr." <jackalmage@gmail.com>, robert@ocallahan.org
>
> From: "Tab Atkins Jr." <jackalmage@gmail.com>
>> On Thu, Aug 13, 2009 at 3:08 AM, Robert O'Callahan<robert@ocallahan.org> 
>> wrote:
>>> That seems far more complicated than what we currently have. By writing 
>>> it
>>> as a 'gradient' rule you don't benefit background-clip, 
>>> background-position,
>>> background-repeat, multiple backgrounds, and falling back to a 
>>> background
>>> image. It's not extensible to other kinds of gradients, and doesn't 
>>> handle
>>> repeating gradients. And even so,
>>
>> Agreed - it should stay as a functional notation denoting an image
>> that just happens to be constructed by the browser.
>>
>> As to the actual syntax:
>>
>> I think the major loss of the current syntax is the functional
>> notation of the colors.  It's a large gain in complexity, increases
>> the chance of an accidental mistake, and gains us nearly nothing from
>> what I can tell.
>>
>> The vast majority of gradients will, I believe, be simple 2-color
>> fades.  As such, requiring someone to write "from(white),to(black)" is
>> almost criminal when they could just write "white,black" or even
>> "white black".
>
> +1
>
>> More complex gradients are also overcomplexified.  The vast majority
>> of complex gradients will be simple n-color fades, going from one to
>> the next in turn.  Again, it's criminal to then make someone write
>> "from(white),color-stop(50%,orange),to(black)" when they could just
>> say "white orange black".
>
> What do you think of a syntax like :
>
>    gradient: <gradienttype> [<gradientcolors>]?
>
>        <gradienttype> : <linear> | <radial> | <square> | ...
>        <linear> : linear\(<point>,(<point> | <angle>)\)
>                // The first point is 'from' and second is 'to', if the
> second argument is an angle
>        <radial> : radial\(<point>,<point>\)
>                // First point is 'center of the radial' and second is a
> point of the 100% circle
>        ...
>
>        <point> : (top | bottom)? <length>? (left | right)? <length>?
>                            // top left is by default;top 10% right 5%
> is the point
>                            located at 10% of the top and 5% of the end
> of the gradient image
>        <lenght> : Or should it be <percentage> ?
>
>        <gradientcolors> : <color>, [<length> <color>, ]* <color>
>                            // First is always at 0%, last at 100%
>
> Sample :
>
>    gradient: radial(left, right) white, 50% #ddd, black;
>
> Would produce :
>
>
>
> Sample :
>
>    gradient: linear(top left, bottom right) white, black;
>
> Would produce :
>
>    A simple linear diagonal gradient from white to black;
>
> Sample :
>
>    gradient: linear(left 50%, right) black, white;
>
> Would produce :
>
>
>
>
> Regards,
> François
>
> -------------------------------------------------------
>
>
> Bert
> -- 
>  Bert Bos                                ( W 3 C ) http://www.w3.org/
>  http://www.w3.org/people/bos                               W3C/ERCIM
>  bert@w3.org                             2004 Rt des Lucioles / BP 93
>  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France
> 
Received on Friday, 21 August 2009 13:13:38 GMT

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