Skip to content

Instantly share code, notes, and snippets.

@zastrow
Last active March 4, 2022 14:34
Show Gist options
  • Save zastrow/7f817a4a519b7d2b3514f49ec7efc690 to your computer and use it in GitHub Desktop.
Save zastrow/7f817a4a519b7d2b3514f49ec7efc690 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
> 1%
last 2 versions
// ----
// libsass (v3.5.4)
// ----
// Grayscale
@function gray($level) {
@if $level == 0 {
@return white;
}
@else if $level == 100 {
@return black;
}
@else {
@return darken(white, $level * 1%);;
}
}
.example-1 {
color: gray(0);
}
.example-2 {
color: gray(44);
}
.example-3 {
color: gray(100);
}
.example-1 {
color: white;
}
.example-2 {
color: #8f8f8f;
}
.example-3 {
color: black;
}
{
"sass": {
"compiler": "dart-sass/1.32.12",
"extensions": {
"libsass": "3.5.4"
},
"syntax": "SCSS",
"outputStyle": "expanded"
},
"autoprefixer": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment