Skip to content

Instantly share code, notes, and snippets.

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