Last active
January 8, 2016 20:32
-
-
Save JakeBeresford/dd84d76e5363060a3d78 to your computer and use it in GitHub Desktop.
HTML5 Picture SublimeText Snippet - for responsive images
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
<!---------------------------------------------------------------------------- | |
This snippet should be used in conjunction with PictureFill from Scottjehl | |
https://github.com/scottjehl/picturefill | |
-----------------------------------------------------------------------------> | |
<snippet> | |
<content><![CDATA[ | |
<picture> | |
<source media="(min-width: 64em)" src="${1:high-res.jpg}"> | |
<source media="(min-width: 37.5em)" src="${2:med-res.jpg}"> | |
<source src="${3:low-res.jpg}"> | |
<img src="${4:fallback.jpg}" alt="This picture loads on non-supporting browsers."> | |
<p>${5:Accessible text.}</p> | |
</picture> | |
]]></content> | |
<tabTrigger>pic</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<scope>text.html</scope> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment