Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to resize Bootstrap open-iconic

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>
like image 302
John Avatar asked Nov 13 '18 15:11

John


1 Answers

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>
like image 185
Akber Iqbal Avatar answered Sep 23 '22 12:09

Akber Iqbal