Reputation: 696
I am working on RoR. Using twitter bootstarp for my website front end design. And planning to use amazon cdn as asset host. I pushed all the static files to amazon. I am using amazon-s3 as cdn origin. Pushed the sprite images glyphicons-halflings and glyphicons-halflings-white in to the cdn and importing it to bootstrap_and_overrides.css.less like
@iconSpritePath: asset-path("icons/glyphicons-halflings");
@iconWhiteSpritePath: asset-path("icons/glyphicons-halflings-white");
But it is not working. Then I created a separate icon.css.less created styles for each image separately.
But still the icons are not taking effect. All the other styles are taking effect and there is only a problem for icons. Can anyone give any suggestions. I am totally stuck on this.
Thank you Regards
Upvotes: 1
Views: 1052
Reputation: 351
On your bootstrap.less file make sure you have this line
@import "sprites.less";
This less file provides the class "icon" to use the icons. Then you can use it this way:
<i class="icon icon-file"></i>
Upvotes: 1