Created
June 6, 2014 17:58
-
-
Save tommymarshall/a131ec485c3c0d7fb043 to your computer and use it in GitHub Desktop.
Vertically centers a child element.
This file contains hidden or 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
=vertically-centered-child | |
font-size: 0 | |
&:before | |
content: '' | |
display: inline-block | |
height: 100% | |
vertical-align: middle | |
> * | |
display: inline-block | |
font-size: $base-font-size | |
vertical-align: middle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment