Unable to resize Bootstrap open-iconic
Asked Answered
C

2

5

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>
Cordula answered 13/11, 2018 at 15:14 Comment(0)
O
9

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>
Oro answered 9/7, 2019 at 4:50 Comment(0)
M
1
<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>
Merbromin answered 30/5, 2021 at 3:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.