How to change the size of an icon in an ion-header-bar?

Edward Maxedon picture Edward Maxedon · Jul 14, 2016 · Viewed 10.6k times · Source

I'm using ionic version 1.2.4.

I'm essentially trying to reduce the size of the icon by changing it's font size. What would be the appropriate CSS selector to change the font-size of the icon in the code below? Nothing I try seems to be working.

  <ion-nav-bar>
    <ion-nav-buttons side="right">
        <button class="button button-clear">
            <i class="icon ion-edit"></i>
        </button>
    </ion-nav-buttons>
  </ion-nav-bar>

Answer

Ritesh Jagga picture Ritesh Jagga · Jul 14, 2016

Declare your button like this

<button class="button button-icon icon ion-android-notifications"></button>

Add this class to your project css file.

.bar .button.button-icon:before {
    font-size: 40px;
}