Skip to content

Instantly share code, notes, and snippets.

@fotan
Created March 30, 2016 14:51
Show Gist options
  • Save fotan/a086538611cd0b150ec8bff9ef8482d5 to your computer and use it in GitHub Desktop.
Save fotan/a086538611cd0b150ec8bff9ef8482d5 to your computer and use it in GitHub Desktop.
SCSS - Black with Opacity
/// Generates the color black, with, optionally, a set opacity.
/// @access public
/// @param {Float} $opacity - Opacity
/// @example scss - Usage
/// .foo {
/// border-color: black(0.1);
/// }
/// @example css - Result
/// .foo {
/// border-color: rgba(0, 0, 0, 0.1);
/// }
@function black($opacity) {
@return rgba(0, 0, 0, $opacity);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment