Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cwmanning/739fc4f61770174bd5e7 to your computer and use it in GitHub Desktop.
Save cwmanning/739fc4f61770174bd5e7 to your computer and use it in GitHub Desktop.
=vertically-centered-child($size: $base-font-size)
font-size: 0
&:before
content: ''
display: inline-block
height: 100%
vertical-align: middle
> *
display: inline-block
font-size: $size
vertical-align: middle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment