Aaron Manire
<svg>
</svg>
<svg xmlns="http://www.w3.org/2000/svg">
</svg>
Note: Unnecessary for inline SVG inside HTML5 doctype
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 274 244">
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 274 244"
width="274px" height="244px">
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 274 244"
width="274px" height="244px">
<path d="M5,137C5,137,5,5,137,5s132,132,132,132H5z"/>
<rect width="101.4" height="101.4"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 274 244"
width="274px" height="244px">
<path d="M5,137C5,137,5,5,137,5s132,132,132,132H5z"/>
<rect width="101.4" height="101.4"/>
<text>Russula<text>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 274 244"
width="274px" height="244px">
<g>
<path d="M5,137C5,137,5,5,137,5s132,132,132,132H5z"/>
<rect width="101.4" height="101.4"/>
<text>Russula<text>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 274 244"
width="274px" height="244px">
<g>
<path fill="#ED1F24" stroke="#000" stroke-width="10" stroke-miterlimit="10" d="M5,137C5,137,5,5,137,5s132,132,132,132H5z"/>
<rect x="86.4" y="137" fill="#FFF" stroke="#000" width="101.4" height="101.4"/>
<text x="60" y="96" text-anchor="middle" font-size="48">
Russula
<text>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 274 244"
width="274px" height="244px">
<g>
<path fill="#ED1F24" stroke="#000" stroke-width="10" stroke-miterlimit="10" d="M5,137C5,137,5,5,137,5s132,132,132,132H5z"/>
<rect x="86.4" y="137" fill="#FFF" stroke="#000" width="101.4" height="101.4"/>
<text x="60" y="96" text-anchor="middle" font-size="48">
Russula
<text>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 274 244"
width="274px" height="244px">
<g id="mushroom" class="mushroom">
<path class="mushroom__cap" d="M5,137C5,137,5,5,137,5s132,132,132,132H5z"/>
<rect class="mushroom__stem" fill="#FFF" stroke="#000" stroke-width="10" stroke-miterlimit="10" width="101.4" height="101.4"/>
</g>
</svg>
.mushroom__cap {
fill: green;
stroke: black;
stroke-width: 10;
}
<svg viewBox="0 0 274 244">
</svg>
<svg viewBox="0 0 274 244" width="100%">
</svg>
Demo of viewport, viewBox, & preserveAspectRatio
sarasoueidan.com/demos/interactive-svg-coordinate-system/
creativedroplets.com/export-svg-for-the-web-with-illustrator-cc/
Mac OS only
Collaborative workflow like Google Docs.
Mac OS only
Omnigraffle 7 introduced SVG imports
Nodejs-based tool for optimizing SVG vector graphics files.
github.com/svg/svgo
Sketch SVGO Compressor plugin
github.com/BohemianCoding/svgo-compressor
<img src="filename.svg" alt=""/>
.toolbar-icon-help-main:before {
background-image: url(images/questionmark-disc.svg);
}
calendar.perfplanet.com/2011/why-inlining-everything-is-not-the-answer/
<svg>
<defs>
<g id="mushroom--amanita">
<path fill="#ED1F24" stroke="#000" stroke-width="10" d="M5,137C5,137,5,5,137,5s132,132,132,132H5z"/>
<rect x="86.4" y="137" fill="#FFF" stroke="#000" width="101.4" height="101.4"/>
<circle cx="80" cy="90" r="10" fill="#FFF"/>
<circle cx="160" cy="60" r="20" fill="#FFF"/>
</g>
</defs>
</svg>
<svg viewBox="0 0 274 244>
<use x="100" y="100" xlink:href="#mushroom--amanita"/>
</svg>
<svg>
<symbol id="mushroom--psilocybe" viewBox="0 0 274 244">
<path fill="#6d7AA7" stroke="#000" stroke-width="10" d="M5,137C5,137,5,5,137,5s132,132,132,132H5z"/>
<rect x="86.4" y="137" fill="#FFF" stroke="#000" width="101.4" height="101.4"/>
</symbol>
</svg>
sarasoueidan.com/blog/structuring-grouping-referencing-in-svg/
<svg>
<use xlink:href="#mushroom--psilocybe"/>
</svg>
.mushroom--angry {
background-image: url('data:image/svg+xml;utf8,
<svg%20width="170mm"%20height="170mm"%20xmlns="http://www.w3.org/2000/svg"><g><text%20transform="rotate(-45%20324.7626037597656,238.86323547363284)"%20font-weight="bold"%20text-anchor="middle"%20font-family="Sans-serif"%20font-size="63"%20y="259.28"%20x="328.18"%20%20fill="%23DDD">%C3%89SVG SVG SVG SVG SVG SVG</text></g></svg>');
}
.mushroom--happy {
background-image: url('data:image/svg+xml;utf8,
<svg%20width="170mm"%20height="170mm"%20xmlns="http://www.w3.org/2000/svg"><g><text%20transform="rotate(-45%20324.7626037597656,238.86323547363284)"%20font-weight="bold"%20text-anchor="middle"%20font-family="Sans-serif"%20font-size="63"%20y="259.28"%20x="328.18"%20%20fill="%23DDD">%C3%89SVG SVG SVG SVG SVG SVG</text></g></svg>');
}
Use height/width presentation attributes to eliminate the Flash of Unstyled SVG
core/misc/icons/
core/themes/stable/images/core/icons/
{% include active_theme_path() ~ '/images/filename.svg' %}
SVG Image Formatter sandbox module
d.o/sandbox/neilgardner/2505991
Ability to upload SVG to image fields is coming to core*
in Drupal 8.2 8.3 8.4?
d.o/node/2652138
* Requires ImageMagick toolkit
<title>
element in place of alt attribute<desc>
for detailed descriptionaria-labelledby
attribute
<svg aria-labelledby="title desc" role="img">
<title>Green rectangle</title>
<desc>A light green rectangle with rounded corners</desc>
</svg>
* 8/17/2016 Chrome suspended intent to deprecate
groups.google.com/a/chromium.org/d/msg/blink-dev/5o0yiO440LM/YGEJBsjUAwAJ
Summary of new features
github.com/w3c/svgwg/wiki/SVG-2-new-features
Aaron Manire