Re: Applying SVG properties to non-SVG content

On Jul 14, 2008, at 5:30 AM, Erik Dahlström wrote:

>> I'd be tempted to agree, but I think that it also needs to be  
>> extremely careful to not introduce incompatible definitions. If  
>> gradients are added to CSS I'd like to see some proposals for how  
>> they'd be meant to integrate and apply to SVG.
>
> Cheers
> /Erik

I have yet to write up my gradients proposal, but basically gradients  
work anywhere you can specify an image using CSS syntax.  Any code  
that uses the url(...) syntax now works with -webkit-gradient.  This  
includes any CSS images referenced by SVG in WebKit today.

ToT WebKit has (to use Robert's term) several "bling" features:

(1) Gradients
(2) Reflections
(3) Masks
(4) CSS Canvas

3.1 WebKit also has:

(5) Transforms
(6) Transitions

and the iPhone 2.0 has

(7) Animations

(and 3d transforms)

Covering each one:

(1) Gradients - apply to any CSS images used by SVG.
(2) Reflections - can work with SVG content (right now you can reflect  
<svg> or an ancestor of <svg> in WebKit, but you can't reflect a  
portion of an SVG image).
(3) Masks - have to do with the CSS box model (e.g., like backgrounds)  
so only apply to SVG elements that honor the CSS box model.  The  
images passed to the masks can be SVG images though.
(4) CSS Canvas - I do not plan to propose this for standardization,  
but the CSS canvas can in fact be used by SVG files in the same way  
CSS gradients can.
(5) Transforms - We deliberately chose a similar syntax to SVG and  
would like to see this property apply to SVG content.
(6-7) Transitions / Animations - Operate purely on CSS styles and  
therefore work with SVG CSS in WebKit.

Of all the features listed above, I expect the CSS canvas would be the  
most contentious to standardize (I don't plan to propose it, so  
problem solved).  Other properties that might be moderately  
contentious are masks and reflections.  I think reflections fall into  
the category of "Sure you could do this with element paint servers,  
but it would be very complicated compared to a single property."   
Libraries like Reflection.js illustrate the desire of Web authors for  
a simple way to do reflections.

dave
(hyatt@apple.com)

Received on Monday, 14 July 2008 19:24:21 UTC