Skip to content

Instantly share code, notes, and snippets.

@jamiemagique
Created January 13, 2016 12:16
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 jamiemagique/ed05d9cb4f0c0690fc20 to your computer and use it in GitHub Desktop.
Save jamiemagique/ed05d9cb4f0c0690fc20 to your computer and use it in GitHub Desktop.
Sass multiline selectors from list
.swiper-wrapper,
.gallery-item-list,
.gallery-thumb-list {
background: #000;
}
// scss
$swiper-wrappers: ('swiper-wrapper', 'gallery-item-list', 'gallery-thumb-list');
$swiper-wrapper-classes: ();
@each $swiper-wrapper in $swiper-wrappers {
$swiper-wrapper-classes: append($swiper-wrapper-classes, unquote('.#{$swiper-wrapper}'), comma);
}
#{$swiper-wrapper-classes} {
background: #000;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment