Icons and the Web

Icons on Screens

Icons are visual metaphors that help users navigate an interface.

2013 iOS 7
Code for America Style Guide

Raster Icons

16 x 24 icon

Ideal

Pixels

icon on 20 x 20 grid
result of 0.5px offset

The bad news

Vector artwork may not scale cleanly to physical pixels.

The good news

High resolution displays make these issues less visible.

Icon fonts

Anatomy of a font
Anatomy of an icon font

Stylable & Scalable

and well supported

but it’s still a hack…

Sizing & positioning

Fallbacks & accessibility

Pig

vs

p Pig

vs

 Pig

SVG

Support

Including SVG

Inline

Linked

SVG as Package

Icon Symbols

Internal Symbol
External Symbol

SVG with Fallbacks

Which one should I use?

A quick recap

Icon Fonts

What’s good

  • Scalable
  • Stylable
  • Solid browser support

What’s not

  • Imprecise size & positioning
  • Verbose accessibility & fallbacks
  • Difficult to author fonts

Raster Icons

What’s Good

  • Pixel-level control
  • Browser support

What’s Not

  • Fixed size & resolution
  • Limited packaging support

SVG Icons

What’s Good

  • Individual or packaged icons
  • Vector based
  • Some styling support
  • Use as image
  • Many tools available

What’s Not

  • Browser support

SVG is your best bet for most cases, especially when coupled with a raster fallback.

Use whatever makes your life easier.

Thanks!

Bonus Reel

Web Components

Responsive icon design

Microphone from Iconic