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

Re: [css3-images] design of gradients and use of functions in CSS in general.

From: Andrew Fedoniouk <andrew.fedoniouk@live.com>
Date: Fri, 12 Aug 2011 10:37:36 -0700
Message-ID: <BLU165-ds169DF4174483F2006AACFFF8250@phx.gbl>
To: "Brad Kemper" <brad.kemper@gmail.com>
Cc: <www-style@w3.org>
>-----Original Message----- 
>From: Brad Kemper
>Sent: Friday, August 12, 2011 8:57 AM
>To: Andrew Fedoniouk
>Cc: www-style@w3.org
>Subject: Re: [css3-images] design of gradients and use of functions in CSS
>  in general.
>
>
>On Aug 12, 2011, at 12:09 AM, Andrew Fedoniouk wrote:
>
>> Brad did tremendous job with css3-images spec. We now better understand
>> the problem.
>
>It was Tab, actually. I just provided my feedback. And I would say that
>most of the problems in linear-gradient have been resolved.

My honest respects to both of you and to Elika then.

As far as I remember you agreed on the fact that current spec.
covers only basic use cases.  It is really about left-to-right and
top-to-bottom cases for now.
Gradients that use angles for example are can only be considered as 
intentions
in current spec. - far from being full. We've discussed this already (e.g.
in respect of transitions).

Current state of specification would be perfectly fine if
we use extensible notation for gradients. So when practice will require
we will be able to extend them.

Let's think about future needs.
For example to add to linear-gradient() definition of "gradient ellipse".
Diameter of the ellipse/circle and the angle will give us gradient line.
We should be able to put this ellipse/circle in any place of
element's background in the same way as with no-repeat images.

Actually radial-gradient and linear-gradient are the same entity -
both of them use notion of ellipse - area where
gradient-line[s] live. linear-gradient just happens to have
single gradient-line and radial has infinite number of them.

Ok, back to spec.

Either we shall try to cover all possible use cases now
or we shall use some extensible notation. No other options I think.

And yet, how gradients are presented in CSSOM is also quite interesting
question.

This:
   gradient( type:linear, angle:33deg, dim:100% );

for example is clear how to split in parts for the script:

   element.style.backgroundImage.gradient.angle = degree(33);

But currently I am not sure how to do the same other than composing
string value and assigning it as a whole. That per se is completely
different operation: changing state register vs. assigning brand new value.

-- 
Andrew Fedoniouk

http://terrainformatica.com 
Received on Friday, 12 August 2011 17:38:14 GMT

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