Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Duplicated icon issue with Twitter Bootstrap and Font Awesome

I am having an issue with this menu with icons using bootstrap and font awesome, both in less format and being compiled at runtime with JavaScript.

Both black and blue ones are showing up at the same time!

The code:

<div class="well sidebar-nav">
    <ul class="nav nav-list">
        <li class="nav-header">Relatórios</li>
          <li><a href="#"><i class="icon-facebook-sign"></i> Acessos na s-Commerce</a></li>
          <li><a href="#"><i class="icon-shopping-cart"></i> Acessos para a loja</a></li>
    </ul>
</div>

Browser output:

Duplicated Icon

like image 942
Vinicius Tavares Avatar asked Jul 12 '12 12:07

Vinicius Tavares


3 Answers

with the new version of bootstrap what i did on CSS was this:

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

worked like a charm :)

like image 142
Rodrigo Avatar answered Nov 22 '22 15:11

Rodrigo


Had to add this to my CSS

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

.btn [class^="icon-"], .btn [class*=" icon-"] {
    line-height: 1.3em;
}
like image 20
Sourabh Avatar answered Nov 22 '22 15:11

Sourabh


When I was writing this question, came to my mind to remove the sprites.less from the bootstrap includes. Fixed and worked like a charm.

like image 40
Vinicius Tavares Avatar answered Nov 22 '22 17:11

Vinicius Tavares