Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kamaal-/811ac6d56afb29fd5ae7fd346906e2c1 to your computer and use it in GitHub Desktop.
Save kamaal-/811ac6d56afb29fd5ae7fd346906e2c1 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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment