Gecko:SVGLayout: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 5: Line 5:
I think there's just no way to do this right now. SVG does not support inside-out sizing.
I think there's just no way to do this right now. SVG does not support inside-out sizing.


* XUL + SVG? Not sure what the typical use case is here.
* XUL + SVG? Not sure what the typical use case is here. Can someone paste an example?
 
* A big use case is going to be drawing an SVG element as the background (or foreground) of a regular HTML or XUL element. For HTML we can do this:
<pre><div style="position:relative; z-index:0;">
  <svg xmlns="..." style="position:absolute; z-index:-1; left:0; top:0; width:100%; height:100%;">...</svg>
</div></pre>
I guess this doesn't work in XUL. But could a XUL stack do the same thing? Maybe it's not a great solution for HTML either ... should we come up with something easier? Although for HTML this could be abstracted nicely via CSS:
<pre>  .svg-container { position:relative; z-index:0; }
  .svg-container > svg { position:absolute; z-index:-1; left:0; top:0;
width:100%; height:100%; }</pre>


Some suggestions:
Some suggestions:
1,295

edits

Navigation menu