Re: recommendations to css3 draft ...

* Robin Berjon wrote:
>> Can you come up with a better solution that does not require to
>> change SVG?
>
>This seems more than overly complicated to me, in addtion to changing 
>SVG. Why would you need to refer to geometry? To get a gradient, just do:
>
>    <svg version="1.1" xmlns="http://www.w3.org/2000/svg">
>      <linearGradient id="g1">
>        <stop offset="0%"   stop-color="black" />
>        <stop offset="100%" stop-color="white" />
>      </linearGradient>
>    </svg>
>
>And then refer to #g1. Use the geometry the browser knows about to fill 
>appropriately.

Because implementations are currently required to treat this as if it
were <svg version="1.1" xmlns="http://www.w3.org/2000/svg" />. So are
you saying the CSS specification should include requirements to make
this work? It seems you are suggesting to introduce new high-level
syntax to differentiate between these cases, e.g. something like

  background-image: gradient-url(gradient.svg#g1); /* versus */
  background-image:          url(gradient.svg#g1);

since we cannot change the meaning of the latter in a simple way that
is compatible with down-level clients; or what did you have in mind
here?

>> Not really, the gradient would fill the entire shape for which the
>> start/end coordinates are already known, and the spread method is
>> also not needed, you could say "pad" implicitly, that would cover
>> most cases I can think of. So the syntax for the above could be as
>> in http://lists.w3.org/Archives/Public/www-style/2004May/0184.html
>> 
>>   @linear-gradient g1 { @stop-at 0% black;  @stop-at 100% white; }
>
>Ah yes, inventing yet more ad hoc @rules to create structure. Hmmm. I 
>think you're getting it wrong however, what you you think about this 
>approach:

Could you elaborate on why you think so?

>@namespace svg "http://www.w3.org/2000/svg";
>
>@element svg|svg {
>   @element svg|linearGradient {
>     @attribute id "g1";
>     @element svg|stop {
>       @attribute offset "5%";
>       @attribute stop-color "white";
>     }
>     @element svg|stop {
>       @attribute offset "95%";
>       @attribute stop-color "black";
>     }
>   }
>}

Seems overly verbose to me...

>> That's just a few lines, yes. Of course, if you want to do hyper
>> sophistacted gradients, this would not suffice, but then, you can
>> still use background images as people use them today.
>
>Sorry, but wanting my gradients to go in more than one direction is not 
>"hyper-sophisticated". I don't get the impression that the examples you 
>provide could even do vertical gradients (or perhaps not horizontal ones 
>-- they don't see to have direction).

http://lists.w3.org/Archives/Public/www-style/2004May/0184.html provides
syntax for that, you would reference the gradients using a functional
notation like gradient(<id>, <direction>).

Received on Wednesday, 18 August 2004 16:21:31 UTC