Skip to content

Instantly share code, notes, and snippets.

@jaandrle
Created August 6, 2021 09:18
Show Gist options
  • Select an option

  • Save jaandrle/14b3271ecb2637785290878a3e03df36 to your computer and use it in GitHub Desktop.

Select an option

Save jaandrle/14b3271ecb2637785290878a3e03df36 to your computer and use it in GitHub Desktop.
/// Adds a pseudo-element to help vertically align text labels in buttons/block-like links with only one magic number
/// idea originaly from: `https://ishadeed.com/article/button-label-alignment/`
@mixin vertically-align-label($height: 1em) {
&:before {
content: '';
display: inline-block;
height: $height;
vertical-align: middle;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment