damilya damilya - 1 year ago 262
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

.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 Source

Try to use this:

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

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download