-
-
Save paulstraw/c43243867b53a7455e077f81651988c0 to your computer and use it in GitHub Desktop.
LDS Example
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
<style scoped> | |
.hero-placeholder { | |
background-image: url("https://my-source.imgix.net/header1.jpg?w=320"); | |
} | |
@media (min-width: 640px) { | |
.hero-placeholder { | |
background-image: url("https://my-source.imgix.net/header1.jpg?w=640"); | |
} | |
} | |
@media (min-width: 960px) { | |
.hero-placeholder { | |
background-image: url("https://my-source.imgix.net/header1.jpg?w=960"); | |
} | |
} | |
</style> | |
<section class="hero-placeholder"> | |
Lorem ipsum dolor sit amet | |
</section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is linked to from https://blog.imgix.com/2016/06/22/imgix-js-3
I saw the use of the "scoped" attribute - not knowing what it was, I was quick to learn that it's all but dead. Seemed very short lived although I could see lost of frameworks would live this in their spaghetti output. On top of that - this gist doesn't really show it's correct usage anyway (would need a wrapper HTML element).