SlideShare a Scribd company logo
SVG STRIKES BACK 
Matt Baxter • @mbxtr • October 7, 2014
Matt Baxter 
@mbxtr
SVG Strikes Back
UX Designer 
Design + Code
SV-WHAT?
Scalable 
Vector 
Graphics
So 
Very 
Good
SVG 
is an open graphics 
standard, made for the 
web, based on XML.
SVG 
is for any illustrated 
image.
Logos
Logos
Icons
Icons
LOLcats
LOLcats
Scalability 
Vector Raster
Scalability 
Vector Raster
File Size 
512x512 
SVG (2kb) PNG (88kb)
True resolution 
independence
Responsive design is 
more than just 
mobile/tablet/desktop 
a
SVG is Old 
(in web years, anyways)
1.0 Recommendation 
…back in 2001
Where has it been 
for 13 years?
2001 2006 
2005 
2011
The need for resolution-independent 
images is 
greater than ever.
Screens in 2001 
65% 
800x600 
30% 
1024x768 
http://www.nngroup.com/articles/computer-screens-getting-bigger/
Screens in 2014 
http://www.html5rocks.com/en/tutorials/tooling/synchronized-cross-device-testing/
Pixel density in 2001 
1x 
(standard monitor)
Pixel density in 2014 
iOS 
1x 
2x 
3x 
Android 
LDPI 
HDPI 
XXHDPI 
MDPI 
XHDPI 
XXXHDPI
SVG was 
made for the 
multi-device web.
Desktop Support 
All modern desktop 
browsers (IE 9+) 
http://caniuse.com/#feat=svg
Mobile Support 
All modern mobile 
browsers (Android 4+) 
http://caniuse.com/#feat=svg
Drawbacks? 
None 
(with correct images 
and fallbacks)
Finally, SVG is a 
practical web 
technology.
If it can be SVG, 
it should be SVG.
CREATING 
SVG
Manually
https://developer.mozilla.org/en-US/docs/Web/SVG/Element
Good luck 
with that! 
https://developer.mozilla.org/en-US/docs/Web/SVG/Element
But seriously, it 
can be useful to 
know a little. 
https://developer.mozilla.org/en-US/docs/Web/SVG/Element
Vector Programs 
Illustrator Sketch Inkscape
Vector Programs 
My weapon of choice
SVG Strikes Back
SVG Strikes Back
Be careful with this. 
Your SVG won’t have a width/ 
height and Internet Explorer 
may not render correctly.
SVG Strikes Back
Optimize with SVGO 
https://github.com/svg/svgo
USING 
SVG
Just like any other image
CSS Fallback
Inline Fallback
What about 
icon fonts?
Icon fonts… 
• Are difficult to position 
• Use a single color 
• Annoying to update 
• Browser inconsistencies
SVG… 
• Precision positioning 
• Multiple colors 
• Simple to update 
• Better browser consistency
To Recap…
SVG is… 
• Resolution independent 
• Small in file size 
• Cross-browser compatible 
• Simple to use
SVG is… 
• Resolution independent 
• Small in file size 
• Cross-browser compatible 
• Simple to use 
Start using it today!
But, that’s 
not all…
Since it’s XML…
THE DOM
Inject into HTML
Inspect w/ Dev Tools
SVG Strikes Back
Style with CSS 
http://www.opera.com/docs/specs/presto25/svg/cssproperties/
CSS Transitions
Media Queries
SVG Strikes Back
Attach Events
SVG.JS 
http://svgjs.com
SVG.JS
Trianglify (D3.js) 
http://qrohlf.com/trianglify/
PROTOTYPE 
http://tomgermeau.com/2014/02/how-designers-can-create- 
interactive-prototypes-with-illustrator/
Wireframes
Organize Layers
Export to SVG 
This time, we 
want responsive.
SVG Strikes Back
Load into HTML
Add Interactivity
SVG Strikes Back
SVG Strikes Back
Start Local Server
Set Emulation
Set Emulation
Open Browser
SVG Strikes Back
AND MORE
http://css-tricks.com/mega-list-svg-information/
THANKS! 
Slides: 
http://bit.ly/svg-strikes-back 
Tweet at me: 
@mbxtr

More Related Content

SVG Strikes Back