Skip to content

Instantly share code, notes, and snippets.

@spleenteo
Created October 25, 2014 21:29
Show Gist options
  • Select an option

  • Save spleenteo/33f631ba39b52833e641 to your computer and use it in GitHub Desktop.

Select an option

Save spleenteo/33f631ba39b52833e641 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.6)
// Compass (v1.0.1)
// ----
.main-menu__item
color: red
$items: (technology: 10, partners: 20, events: 30, about: 40)
@each $item, $pos in $items
.main-menu__item--#{$item}
@extend .main-menu__item
border: 1px solid green
background-position: 0 -#{$pos}px
.main-menu__item, .main-menu__item--technology, .main-menu__item--partners, .main-menu__item--events, .main-menu__item--about {
color: red;
}
.main-menu__item--technology {
border: 1px solid green;
background-position: 0 -10px;
}
.main-menu__item--partners {
border: 1px solid green;
background-position: 0 -20px;
}
.main-menu__item--events {
border: 1px solid green;
background-position: 0 -30px;
}
.main-menu__item--about {
border: 1px solid green;
background-position: 0 -40px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment