Unable to resize Bootstrap open-iconic

4.2k views Asked by At

I installed the open iconic plugin and I want to force the size of the icon In the original library there is a property to change the size, but it doesn't seem to work on the version for Bootstrap. Is there any other way then change the font size?

https://useiconic.com/icons/resize/

  <div class="badge badge-primary badge-pill">
      <span class="oi oi-thumb-down"></span>
  </div>
2

There are 2 answers

0
טאבו ישראל שרות לקוחות On
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha256-m/h/cUDAhf6/iBRixTbuc8+Rg2cIETQtPcH9D3p2Kg0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/open-iconic/1.1.1/font/css/open-iconic-bootstrap.min.css" integrity="sha256-BJ/G+e+y7bQdrYkS2RBTyNfBHpA9IuGaPmf9htub5MQ=" crossorigin="anonymous" />

<span class="oi oi-sort-ascending h1"> </span>
<span class="oi oi-person h2"> </span>
0
Akber Iqbal On

Came across open-iconic for a react issue recently and saw this question un-answered; for normal (non reactJS) use of open iconic, the font-size property would work as shown below;

working snippet with bootstrap v3:

span {
  font-size: 30px;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/open-iconic/1.1.1/font/css/open-iconic-bootstrap.min.css" integrity="sha256-BJ/G+e+y7bQdrYkS2RBTyNfBHpA9IuGaPmf9htub5MQ=" crossorigin="anonymous" />

<span class="oi oi-sort-ascending"> </span>
<span class="oi oi-person"> </span>

working snippet with bootstrap v4:

span {
  font-size: 30px;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha256-m/h/cUDAhf6/iBRixTbuc8+Rg2cIETQtPcH9D3p2Kg0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/open-iconic/1.1.1/font/css/open-iconic-bootstrap.min.css" integrity="sha256-BJ/G+e+y7bQdrYkS2RBTyNfBHpA9IuGaPmf9htub5MQ=" crossorigin="anonymous" />

<span class="oi oi-sort-ascending"> </span>
<span class="oi oi-person"> </span>