shapes can be in the DOM Systematic - easy to build an icon system Animateable - in many comfortable ways Interactive - links! hovers! games! Accessible - in all the right ways SVG is
max-width: auto; width: 100%; height: auto; } Don’t get bigger than the container element. Also, don’t scale up. Don’t get bigger than the container element. Scale up if you need to.
to have an issue with blurring SVG when resizing, but not anymore since v24. Fill the entire background of this element no matter what. Scale up if you have to.
in the DOM: CSS Styling! JavaScript stuff! 2) No additional HTTP Request (it’s like a data URI, but better) 3) You can use define once and use in multiple places
control (i.e. SVG-specific, @media, etc) 4) All the other advantages of inline SVG (accessible, multiple links, scriptable) 5) Fallbacks are possible It’s the same idea, only way better because:
some (single color) better Positioning die XXX murder good Weird Failures* yup less Semantics none <span> / ::before better <svg> Accessibility be very careful better, <title><desc> Ease of use meh better Browser Support IE 6+ IE 9+ Weird Failures: CORS/Fx + more?, CDN/network fail, Chrome non-active tab, no @font-face support (Opera Mini, Nokia XPress, Blackberry 4&5, Android 2.1, Windows Phone 7, 7.8, 8?, more?)
of the element. Think how the browser window is the viewport for the whole site but an iframe has it’s own smaller viewport. Likewise, SVG has it’s own viewport. viewBox is an attribute on <svg>. It is the “canvas” on which SVG instructions are carried out. It is essentially a nexus with an aspect ratio (don’t think of them as pixels).
for CSS background-image This works because it combines multiple backgrounds and old-syntax gradients, thus it works for Android 2.x where multiple backgrounds alone did not. You could use Modernizr too, but if you just need it for this, it would be overkill. pauginer.tumblr.com/post/36614680636/invisible-gradient-technique
<title> and aria-labeledby 4. Provide a <desc> and aria-labeledby 5. Use <text> 6. Make links focusable (if parts) 7. Use ARIA roles 8. Create alternatives