Skip to content

Instantly share code, notes, and snippets.

@BrettBukowski
Created July 2, 2014 15:11
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save BrettBukowski/3bed4b58276e5596e74f to your computer and use it in GitHub Desktop.
Save BrettBukowski/3bed4b58276e5596e74f to your computer and use it in GitHub Desktop.
Perfect vertical+horizontal centering (in SCSS + Bourbon)
// Perfect vertical+horizontal centering.
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
@include prefixer(box-align, center, webkit moz ms spec);
-ms-flex-align: center;
@include prefixer(align-items, center, webkit spec);
@include prefixer(box-pack, center, webkit moz);
-ms-flex-pack: center;
@include prefixer(justify-content, center, webkit spec);
@ladislas
Copy link

thanks so much! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment