Created
September 3, 2015 11:37
-
-
Save CreativeSeo33/fd933dac9c0b8ec89e1b to your computer and use it in GitHub Desktop.
mixin centerer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin centerer($horizontal: true, $vertical: true) { | |
position: absolute; | |
@if ($horizontal and $vertical) { | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
} @else if ($horizontal) { | |
left: 50%; | |
transform: translate(-50%, 0); | |
} @else if ($vertical) { | |
top: 50%; | |
transform: translate(0, -50%); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www.creative-seo.ru/