This project is read-only.

Styles inside SVG

Aug 5, 2010 at 7:33 AM

Hi, does this engine supports styles inside SVG files?

For example (from http://tutorials.jenkov.com/svg/svg-and-css.html) this doesn't work

 

<svg xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink">
    
    <style type="text/css" >
      <![CDATA[

        circle {
           stroke: #006600;
           fill:   #00cc00;
        }

      ]]>
    </style>
    
    <circle  cx="40" cy="40" r="24"/>
</svg>

Thanks

<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">

<style type="text/css" >
<![CDATA[

circle {
stroke: #006600;
fill: #00cc00;
}

]]>
</style>

<circle cx="40" cy="40" r="24"/>
</svg>
Aug 5, 2010 at 8:17 AM

I've added the SGV api to the OWASP O2 Platform projet and you can read more details about it here: http://www.o2platform.com/index.php/O2 Script/Tool - SVG Viewer and Editor.h2

Aug 5, 2010 at 10:41 PM

Hey,

Styles should work inside a document, although thinking about it now it might be the case that the <![CDATA[ block is stopping them from working. If possible try to remove the CDATA and see how you go?

The real-time editor you've created there looks great! I'll have to give it download soon :)

Cheers,
Scriv

Oct 28, 2011 at 10:40 AM
Edited Oct 28, 2011 at 11:36 AM

Started new thread regarding my question