Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

glyphicons not showing with sass bootstrap integration

I used this tutorial to integrate bootstrap in my project:

https://laravel-news.com/2015/10/setup-bootstrap-sass-with-laravel-elixir/

This places an app.css file in the css folder. However if I try to use glyphicons they don't show up. So I tried to modify the elixir file like this:

    elixir(function(mix) {

    mix.sass('app.scss')
        .browserify('app.js')
        .copy('node_modules/bootstrap-sass/assets/fonts', 'public/css/fonts')   

});

The fonts folder is copied under public/css/fonts but yet no icon shows up. What am I missing here? Any clue?

in my app.css the path seems correct, for example:

src: url("fonts/bootstrap/glyphicons-halflings-regular.eot");
like image 801
Chriz74 Avatar asked Jan 14 '16 17:01

Chriz74


People also ask

What can I use instead of Glyphicons?

Free Alternatives to Glyphicons You can use both Font Awesome and Github Octicons as a free alternative for Glyphicons.

Can I use Glyphicons in bootstrap 4?

Bootstrap 4 does not have its own icon library (Glyphicons from Bootstrap 3 are not supported in BS4). However, there are many free icon libraries to choose from, such as Font Awesome and Google Material Design Icons.

Where are bootstrap Glyphicons stored?

Where to find Glyphicons? Associated CSS rules are present within bootstrap. css and bootstrap-min. css files within css folder of dist folder.


1 Answers

I had the same problem with fresh install of laravel 5.2. What I did is just inspected the request path in browser which was :

../build/fonts/bootstrap/glyphicons-halflings-regular.woff2

so I just added to gulp.js this :

mix.copy('node_modules/bootstrap-sass/assets/fonts/bootstrap/','public/build/fonts/bootstrap'); 

and afterwards in terminal :

gulp

That did the trick for me!

like image 95
halfred Avatar answered Nov 09 '22 18:11

halfred