Skip to content

Instantly share code, notes, and snippets.

@drocarmo
Last active August 29, 2015 14:05
Show Gist options
  • Save drocarmo/f34a6952478c7ebb8398 to your computer and use it in GitHub Desktop.
Save drocarmo/f34a6952478c7ebb8398 to your computer and use it in GitHub Desktop.
Mixin that adds opacity to a HEX value variable in a project
@mixin background-opacity($color, $opacity: .3) {
background: $color;
background: rgba($color, $opacity);
}
// Use case
@include background-opacity($color-white, .7);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment