damilya damilya - 21 days ago 7
Sass (Sass) Question

ionic: how to change the size of FAB icon

I am new to cross-platform dev. Struggling with changing the size of FAB.
This is what I have now:

<ion-fab center middle>
<button ion-fab color="blue" class="fabStartBtn"><ion-icon
name="start">Start</ion-icon></button>
</ion-fab>

.fabStartBtn {
font-size: 72px;
}


But the size is still the same. How can I get access to the button attribute? I tried id, name, #name, :before - didn't work.

Answer

Try to use this:

<ion-fab center bottom>
  <button ion-fab mini><ion-icon name="add"></ion-icon></button>
</ion-fab>

If you use the mini attribute you can modify the size with this:

.fab[mini] {
    margin: 8px;
    width: 40px;
    height: 40px;
    line-height: 40px;
}

If you modify that class you can make the FAB button bigger or smaller.