Little tool, written in elm, that converts ASCII to SVG. ASCII to SVG Source (GitHub) →ASCII to SVG Demo →
Nice pen by Ana Tudor in which you can see how the angle set for a CSS Gradient and set for an SVG Gradient differ: . At a 45° angle you can clearly see exactly what the difference between the … Continue reading
Sara Soueidan, who else, has written an extensive article on how to mimic relative positioning in an SVG. The gist: nest your SVGs. Whilst her examples are – as per usual – very extensive and complete, I took the liberty … Continue reading
<script src=”https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js”></script> <script src=”conic-gradient.js”></script> Conic gradients are awesome, but browsers haven’t realized yet. This polyfill lets you experiment with them now. By Lea Verou. Automatically creates an SVG which is set as the background. Uses -prefix-free. Alternatively you can also … Continue reading
Solid presentation by @SaraSoueidan herself. Recently rebuilt a flash site using a SMIL animated SVG logo (embedded below). Presentations like these, packed with code and real examples, are very helpful. Check out this Pen!
<picture> <!–[if IE 9]><video style="display: none;"><![endif]–> <source type="image/svg+xml" srcset="path/to/header–full.svg"> <source type="image/svg+xml" srcset="path/to/header–medium.svg" media="(max-width: 1024px)"> <source type="image/svg+xml" srcset="path/to/header–small.svg" media="(max-width: 640px)"> <!–[if IE 9]></video><![endif]–> <img src="path/to/header-1x.png" srcset="path/to/header-2x.png 2x, path/to/header-3x.png 3x" alt="Header description"> </picture> Besides using an SVG as a background image in … Continue reading
Define a <pattern>, give it an id, and then use it as a fill on an other SVG element using said id: <svg height="10" width="10" xmlns="http://www.w3.org/2000/svg" version="1.1"> <defs> <pattern id="circles-1" patternUnits="userSpaceOnUse" width="10" height="10"> <image xlink:href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMCcgaGVpZ2h0PScxMCc+CiAgPHJlY3Qgd2lkdGg9JzEwJyBoZWlnaHQ9JzEwJyBmaWxsPScjZmZmJyAvPgogIDxjaXJjbGUgY3g9IjEiIGN5PSIxIiByPSIxIiBmaWxsPSIjMDAwIi8+Cjwvc3ZnPg==" x="0" y="0" width="10" height="10"> </image> … Continue reading