Skip to content

Instantly share code, notes, and snippets.

@geoffyuen
Created January 28, 2021 04:48
Show Gist options
  • Save geoffyuen/9e2a39da4be16fd4072df4b9814b1b1e to your computer and use it in GitHub Desktop.
Save geoffyuen/9e2a39da4be16fd4072df4b9814b1b1e to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
@function cfg($key, $map: $cfg) {
@return map-get($map, $key);
}
$tach:(
values: (
0: 0,
1: 1px,
2: 2px,
),
rules: (
pv: (
varrules: (padding-top, padding-bottom,),
staticrules: (
"margin": "0",
"border": 0px 0px 0px,
)
)
)
),(
values: (
0: 0,
1: 1em,
2: 2em,
),
rules: (
mv: (
varrules: (margin-top),
staticrules: (
"padding": "0",
"box-shadow": 0px 0px 0px
)
)
)
);
@each $cfg in $tach {
@each $classname, $rules in cfg(rules, $cfg) {
@each $suffix, $val in cfg(values, $cfg){
.#{$classname}#{$suffix} {
@each $rule in cfg(varrules, $rules) {
#{$rule}: #{$val};
}
@each $x, $y in cfg(staticrules, $rules) {
#{$x}: #{$y};
}
}
}
}
}
.pv0 {
padding-top: 0;
padding-bottom: 0;
margin: 0;
border: 0px 0px 0px;
}
.pv1 {
padding-top: 1px;
padding-bottom: 1px;
margin: 0;
border: 0px 0px 0px;
}
.pv2 {
padding-top: 2px;
padding-bottom: 2px;
margin: 0;
border: 0px 0px 0px;
}
.mv0 {
margin-top: 0;
padding: 0;
box-shadow: 0px 0px 0px;
}
.mv1 {
margin-top: 1em;
padding: 0;
box-shadow: 0px 0px 0px;
}
.mv2 {
margin-top: 2em;
padding: 0;
box-shadow: 0px 0px 0px;
}
{
"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