Skip to content

Instantly share code, notes, and snippets.

@mmcgahan
Last active December 21, 2015 12:59
Show Gist options
  • Save mmcgahan/6309664 to your computer and use it in GitHub Desktop.
Save mmcgahan/6309664 to your computer and use it in GitHub Desktop.
unfilled info icon SASS mixin
@mixin unfilledInfo($color: $C_darkblue, $backgroundColor: white, $iconSize: 16px, $borderWidth: 1px, $borderColor: false) {
// $iconSize must be in px, defaults to small
// info icon is "filled" but we want to simulate un-filled
// therefore background-color = letter color (the see-through part)
// border-color = circle border color
// color = color inside circle (the filled-in part of icon)
// this might make a good mixin for red-label
@if not $borderColor {
$borderColor: $color;
}
color: $backgroundColor;
background-color: $color;
border: $borderWidth solid $borderColor;
border-radius: $iconSize / 2 + $borderWidth;
margin-top: -$borderWidth
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment