Skip to content

Instantly share code, notes, and snippets.

@zastrow
Created September 23, 2020 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zastrow/384bad5bcef40fcc37f4143f77597c02 to your computer and use it in GitHub Desktop.
Save zastrow/384bad5bcef40fcc37f4143f77597c02 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// default -> inside /node_modules/sparkle
$settings: (
'utilPrefix': 'sbx',
'colorUtil': true
) !default;
$colors: (
'red': #900,
'green': #090,
'blue': #009
) !default;
// --------- //
// config -> ./config.scss
$settings: map-merge(
$settings,
(
'utilPrefix': 'util',
'colorUtil': false
)
);
$colors:(
'red': #f00
);
// functions
@function settings($val) {
@return map-get($settings, $val);
}
@function color($val) {
@return map-get($colors, $val);
}
.this-test {
test: color('red');
}
@if settings(colorUtil) {
.#{settings(utilPrefix)}- {
@each $key, $val in $colors {
&color-#{$key} {
color: $val;
}
}
}
}
.this-test {
test: #f00;
}
{
"sass": {
"compiler": "dart-sass/1.26.11",
"extensions": {},
"syntax": "SCSS",
"outputStyle": "expanded"
},
"autoprefixer": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment