themeteorchef / base

A starting point for Meteor apps.
http://themeteorchef.com/base
MIT License
690 stars 253 forks source link

Best Practice for Centering Loading Spinner? #188

Closed acomito closed 7 years ago

acomito commented 7 years ago

Maybe not the best place to ask this, so I apologize ahead of time, but do you have any tips for centering the spinner (the one tied in with komposer)?

My initial plan was to make sure all areas have a min-height where the spinner may show up. Then do a '0 auto' margin or something. At this point, I have no min-heights so the spinner looks all out of whack and not centered.

I thought I'd check in to make sure I wasn't missing some clever way to go about it.

themeteorchef commented 7 years ago

Hmm, a margin auto would work! I supposed it depends on where you're trying to center. I'd also look at Flexbox and its align-items/justify-content properties. They can get something perfectly centered without a lot of fuss.