Created
September 23, 2020 15:02
-
-
Save zastrow/ff5d6b9aef47bbf4317de53651725a53 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Maps | |
// - Color Map | |
// - Major Breakpoints | |
// - Spacing | |
// - Font Sizes | |
// - Font Family | |
// - Font Weight | |
// - Display | |
// - Text Align | |
// - Flexbox Properties | |
// Functions | |
// Mixins | |
// Utilities | |
// 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.this-test { | |
test: #f00; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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