-
-
Save murtaugh/cac94695bac33dbdba08 to your computer and use it in GitHub Desktop.
ALA Image Snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<figure> | |
<picture> | |
<source media="(min-width: 600px)" | |
srcset="<!-- URL for high-DPI image here --> 2x" > | |
<img src="<!-- URL for standard image here -->" alt=""> | |
</picture> | |
</figure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<figure> | |
<picture> | |
<source media="(max-width: 700px)" | |
srcset="<!-- URL for small-screen image here --> 1x, | |
<!-- URL for small-screen, high-DPI image here --> 2x" > | |
<source media="(min-width: 600px)" | |
srcset="<!-- URL for high-DPI image here --> 2x" > | |
<img src="<!-- URL for standard image here -->" alt=""> | |
</picture> | |
</figure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<figure> | |
<img src="<!-- SVG URL here -->" data-fb="<!-- fallback URL here -->" onerror="this.src = this.getAttribute('data-fb');"> | |
</figure> |
Removing all tabs and extra whitespace for the same of EE's sanity.
Fixed the width logic in example 4.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ALA uses Filament Group's picturefill to serve high-DPI and small-screen options.