Skip to content

Instantly share code, notes, and snippets.

@sveetch
Last active August 25, 2017 23:39
Show Gist options
  • Save sveetch/3563a8c345827fd74708bcc6dce4a7f2 to your computer and use it in GitHub Desktop.
Save sveetch/3563a8c345827fd74708bcc6dce4a7f2 to your computer and use it in GitHub Desktop.
Mixin to make generic rounded border on font icon
/*
* Mixin for generic rounded webfont icon
*
*/
@mixin -emencia-round-font-icon(
$inner-padding: 1rem,
$font-size: 2rem,
$color: $black,
$border-width: 0.1rem,
$border-color: null
) {
// Use font color if not border color is given
@if $border-color == null {
$border-color: $color;
}
display: inline-block;
padding: $inner-padding;
width: $font-size + ($inner-padding*2) + ($border-width*2);
height: $font-size + ($inner-padding*2) + ($border-width*2);
overflow: hidden;
color: $color;
border-radius: $font-size + ($inner-padding*2);
border: $border-width solid $border-color;
font-size: $font-size;
text-align: center;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment