Closed burmjohn closed 10 years ago
Agree. Thank you for creating this gem.
I ran into the same issue. Fixed it by setting @icon-font-path: "";
in my local bootstrap-on-rails.css.less
file (created per-instructions.)
Curious if this a problem or how it should work? (Also Rails 4.0)
@jehughes thanks for the tip, that worked perfect.
I have this. I should probably document this to README ;)
@icon-font-path: "../bootstrap/";
@icon-font-name: "glyphicons-halflings-regular";
@jasontorres Thank you!
This works well in development, but not in production, I think that you need to use asset-path for the @icon-font-path:
Hi,
I tried the original twitter-bootstrap-rails way. Changed my less file to less.erb, and inserted this code before importing bootstrap files.
@font-face {
font-family: 'Glyphicons Halflings';
src: url('<%= asset_path "glyphicons-halflings-regular.eot" %>');
src: url('<%= asset_path "glyphicons-halflings-regular.eot?#iefix" %>') format('embedded-opentype'),
url('<%= asset_path "glyphicons-halflings-regular.woff" %>') format('woff'),
url('<%= asset_path "glyphicons-halflings-regular.ttf" %>') format('truetype'),
url('<%= asset_path "glyphicons-halflings-regular.svg#glyphicons-halflingsregular" %>') format('svg');
}
Fix this issue temporarily for me.
@waqar-baig Thanks for the suggestion to just overwrite the default. Worked for me as well until this is sorted out in some official way.
Btw, I was able to use the asset-url
helper that's part of less-rails
. This is what I ended up with in a file called bootstrap-icons.less
.
@font-face { font-family: 'Glyphicons Halflings'; src: asset-url("bootstrap/glyphicons-halflings-regular.eot"); src: asset-url("bootstrap/glyphicons-halflings-regular.eot?#iefix") format('embedded-opentype'), asset-url("bootstrap/glyphicons-halflings-regular.woff") format('woff'), asset-url("bootstrap/glyphicons-halflings-regular.ttf") format('truetype'), asset-url("bootstrap/glyphicons-halflings-regular.svg#glyphicons-halflingsregular") format('svg'); }
Then in bootstrap-on-rails.css.less
@import "bootstrap/bootstrap"; @import "bootstrap-icons";
Let me echo the thanks for the Gem. I struggled with each of the solutions above. For me, the following did the trick:
@import "bootstrap/variables";
@icon-font-path: "<%=asset_path ""%>/assets/bootstrap/"; // insert your bootstrap overrides // @linkColor: red; // or import a variable file // @import "variables";
@import "bootstrap/bootstrap";
First, thanks for making this. Awesome.
I tried to test a few glyphicons, and it seems that the URL its point to is: bootstrap/../fonts/glyphicons-halflings-regular.eot
I verified in the app the glyphicons files are located in app.com/assets/bootstrap/
If I change the css live in the browser the following works:
ex: bootstrap/glyphicons-halflings-regular.eot
Perhaps I have something incorrect? (Rails 4.0)