rails sass background image url
Fortunately, it is extremely easy with Sass to have a beautiful API to manage assets and to keep the code simple to maintainfoo background-image: url("/assets/images/kittens.png") None LESS SCSS Sass Stylus PostCSS. Need an add-on?MyResponsiveImage background-color: 000 backround-repeat: no-repeat background-position: 50 50 background-size: cover background-image: url(u-image -url .icon background:image-url("sprites.png") no-repeat -36px -373pxAs sass-rails documentation states: Sprockets provides some directives that are placed inside of comments called require, requiretree, and requireself. The URL paths for CSS images should be configurable rather than being hard-coded. Can this be implemented in the next release? Thanks But what about all the static images you have in your web application? background images, buttons, iconsIf you use the new Asset Pipeline (Rails 3.1), this would work out-of-the-box. All image-path and image-url in your Sass files would automatically change to remote Cloudinary CDN URLs. background-image: url(/images/delete.png). instead of the thing that Im told everywhere it should be generating, the correct and obvious thingNote.