How to avoid HTML1500 Tag cannot be self-closing warning in IE when using embedded svg?

See this question: Are (non-void) self-closing tags valid in HTML5? Basically, HTML5 doesn’t really do self-closing tags. Instead it has void tags, like <br>. This also explains why <script> isn’t self closing when you are using an external js file; <script> isn’t a void element. The SVG you are writing is actually html, so it … Read more

How to make a pattern “fixed” in Raphael.js / IE?

It seems like a redraw bug in IE. One workaround is to reset the fill image by adding path_f.attr({fill:’url(http://www.fotoshack.us/fotos/58480536599_97943820.jpg)’}); after the translation. See fiddle here. This works okay in IE9 except for being slightly sluggish, but maybe you can find a cheaper way of forcing redraws. Not tested in older IEs. Also, it causes flickering … Read more

AndroidStudio import SVG with ERROR@ is not supported

Solution 1 Flattern image in Sketch and use this site to convert SVG to xml for Android Solution 2 I use nonZero instead of evenOdd and open it in Sketch to reverse Order after reverse it will change pathData and remove android:fillType and everything work fine on Android 21+. Solution 3 PNG TLDR After some … Read more

Is it possible to mix HTML form input tags with SVG, or to use SVG to lay out a form?

You can use foreignObject. A small example : <?xml version=”1.0″ standalone=”yes”?> <svg xmlns = “http://www.w3.org/2000/svg” width=”100%” height=”100%”> <rect x=”25″ y=”25″ width=”250″ height=”200″ fill=”#ff0000″ stroke=”#000000″/> <foreignObject x=”50″ y=”50″ width=”200″ height=”150″> <body xmlns=”http://www.w3.org/1999/xhtml”> <form> <input type=”text”/> <input type=”text”/> </form> </body> </foreignObject> <circle cx=”60″ cy=”80″ r=”30″ fill=”#00ff00″ fill-opacity=”0.5″/> </svg> This is a standard SVG, but I added HTML … Read more

How do I tell if a DOM element is HTML or SVG?

You may try something like the following: if(document.getElementById(“el”) instanceof SVGElement) { console.log(“It’s an SVG element”); } <svg xmlns=”http://www.w3.org/2000/svg” xmlns:xlink=”http://www.w3.org/1999/xlink” width=”300″ height=”300″> <g id=”firstGroup”> <rect id=”el” width=”100″ height=”50″ x=”40″ y=”20″ fill=”blue” /> <text x=”40″ y=”100″>This is a basic SVG document!</text> </g> </svg> Note that the <svg> element itself is actually an HTML element containing SVG elements … Read more

SVG: why does external css override inline style for text?

Because in SVG, like HTML before it, styles trump attribute styling. fill=”red” below is NOT an “inline style”, style=”fill:green” IS an inline style. <svg width=”400″ height=”400″> <text x=”50″ y=”50″ fill=”red” style=”fill:green”>This will be green</text> </svg> Like wise, if you have a style defined outside, it will win. <style> text { fill: lime; } </style> <svg … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)