Last active
August 25, 2017 23:39
-
-
Save sveetch/3563a8c345827fd74708bcc6dce4a7f2 to your computer and use it in GitHub Desktop.
Mixin to make generic rounded border on font icon
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 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