Skip to content

Instantly share code, notes, and snippets.

@nsfmc
Created February 28, 2014 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nsfmc/9276127 to your computer and use it in GitHub Desktop.
Save nsfmc/9276127 to your computer and use it in GitHub Desktop.
<!-- one image
you could imagine, for example,
icon.svg#tiny referring to an icon for display on 3x3" display
icon.svg#small referring to an icon on a portrait-oriented phone
icon.svg#default referring to an icon that will be large enough to resolve all detail
-->
<picture>
<source media="(max-width: 12em)" src="icon.svg#tiny">
<source media="(max-width: 24em)" src="icon.svg#small">
<img src="icon.svg#default" width="30" height="20">
</picture>
<!-- or multiple discrete images -->
<picture>
<source media="(max-width: 12em)" src="icon-tiny.svg">
<source media="(max-width: 24em)" src="icon-small.svg">
<img src="icon.svg" width="30" height="20">
</picture>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment