Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wicky-andrian/dd39c5aa773fa4fa70b077784fa2468b to your computer and use it in GitHub Desktop.
Save wicky-andrian/dd39c5aa773fa4fa70b077784fa2468b to your computer and use it in GitHub Desktop.
active storage in css inline for background-image
```
<style media="screen">
body { background-image: url('<%= image_tag @sets.collect(&:background_website).detect(&:attached?) %>') !important;
font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
}
</style>
<div class="body"></div>
```
@wicky-andrian
Copy link
Author

wicky-andrian commented Jul 14, 2018

see my issue on rails
and sample app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment