Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic spinner within button vertical alignment

I have tried to implement a spinner within a button but for some reason the spinner seems to be top aligned instead of vertically centered:
enter image description here

My code is the following:

<button type="submit" class="button button-block button-positive">
<ion-spinner class="spinner-energized"></ion-spinner> Click me!
</button>

Codepen: http://codepen.io/anon/pen/BjOqvK?editors=1010

Any idea why?

like image 942
Nicolazinho Avatar asked Jan 07 '23 17:01

Nicolazinho


1 Answers

The Ionic team offered the following solution:

.spinner svg {
  width: 16px !important;
  height: 16px !important;
}

New codepen

They gave me a bit more context:

This was not the intended use for ion-spinner, so custom css is needed. You need to adjust the width/height.

like image 83
Nicolazinho Avatar answered Jan 16 '23 18:01

Nicolazinho