Skip to content

Instantly share code, notes, and snippets.

@khamer
Created September 17, 2021 19:41
Show Gist options
  • Save khamer/c1c76e612dddfe8f72069e528fcea404 to your computer and use it in GitHub Desktop.
Save khamer/c1c76e612dddfe8f72069e528fcea404 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
/*
<div class="layer bgWhite">…</div>
<div class="layer bgGold">…</div>
<div class="layer bgWhite">…</div>
<div class="layer bgWhite">…</div>
<div class="layer bgGold">…</div>
*/
.layer {
@each $bg in (bgWhite bgGold) {
&.#{$bg} + &.#{$bg} {
margin-top: 0;
}
}
/*
wish I could match complete selector
e.g. "any .layer.bgWhite + .layer.bgWhite"
*/
}
@charset "UTF-8";
/*
<div class="layer bgWhite">…</div>
<div class="layer bgGold">…</div>
<div class="layer bgWhite">…</div>
<div class="layer bgWhite">…</div>
<div class="layer bgGold">…</div>
*/
.layer {
/*
wish I could match complete selector
e.g. "any .layer.bgWhite + .layer.bgWhite"
*/
}
.layer.bgWhite + .layer.bgWhite {
margin-top: 0;
}
.layer.bgGold + .layer.bgGold {
margin-top: 0;
}
{
"sass": {
"compiler": "dart-sass/1.32.12",
"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