Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap 3 without Glyphicons replaced with Font Awesome

I want to remove Bootstrap 3 Glyphicons in favor of Font Awesome. Since Font Awesome already includes most of the Glyphicons y don't want to include them and avoid duplicates and compatibility problems.

when I make a customized bootstrap download and I uncheck the glyphicon component, I still see some glyphicon references on the css file. http://getbootstrap.com/customize/

How can I disable those icons entirely ?

thanks

like image 776
denoise Avatar asked Feb 26 '14 00:02

denoise


People also ask

What can I use instead of Glyphicons?

The best alternatives to GLYPHICONS are InVision , Artify and Sketch Icons.

Can I use Font Awesome without Bootstrap?

Font Awesome works just as well without Bootstrap. Copy the font-awesome directory into your project.

Can I use Glyphicons without Bootstrap?

But before you ask, the answer is yes – you can utilize glyphicons without having to use Bootstrap at all.


2 Answers

Those 6 remaining Glyphicons references in the compiled CSS are regarding the optional use of Glyphicons for the next+prev buttons in the Carousel component. Since the declarations in question are also used for the non-Glyphicon next+prev buttons and represent an absolutely trivial amount of the total file size, I suggest simply ignoring them. For all practical purposes, you've already eliminated Glyphicons from your build.

If you absolutely must annihilate said references, then compile Bootstrap manually, beforehand removing the offending lines from bootstrap/less/carousel.less and removing the @import "glyphicons.less"; line from bootstrap/less/bootstrap.less.
Or you can just manually edit the CSS that the Bootstrap Customizer already generated for you, since the relevant deletions are trivial.

like image 161
cvrebert Avatar answered Oct 03 '22 16:10

cvrebert


As i use bootstrap with Font Awesome, i go to customize page and I unchecked the glyphicon component as you did, but for some time i also add this lines of code at my ( override file ):

[class^="icon-"],
[class*="icon-"] {
  background: none;
}

also you can open the main bootstrap file that you downloaded ( customized one ) and search for font-family: 'Glyphicons Halflings'; , then comment all the @font-face.

Hope this will help you

like image 23
AhmedBinNasser Avatar answered Oct 03 '22 15:10

AhmedBinNasser