Skip to content

Instantly share code, notes, and snippets.

@joshhowenstine
Created November 25, 2014 12:30
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 joshhowenstine/0e380d8d2b00cd0931c2 to your computer and use it in GitHub Desktop.
Save joshhowenstine/0e380d8d2b00cd0931c2 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
$colorslist:
allcolors (pink, yellow),
modules (pink, green),
greys (pink, purple, green, yello)
;
@each $list, $colors in $colorslist {
@for $color from 1 through length($colors) {
section.#{nth($list, 1 )} article:nth-of-type(#{nth($color, 1)}) {
border: 1px solid nth($colors, $color);
}
}
}
section.allcolors article:nth-of-type(1) {
border: 1px solid pink;
}
section.allcolors article:nth-of-type(2) {
border: 1px solid yellow;
}
section.modules article:nth-of-type(1) {
border: 1px solid pink;
}
section.modules article:nth-of-type(2) {
border: 1px solid green;
}
section.greys article:nth-of-type(1) {
border: 1px solid pink;
}
section.greys article:nth-of-type(2) {
border: 1px solid purple;
}
section.greys article:nth-of-type(3) {
border: 1px solid green;
}
section.greys article:nth-of-type(4) {
border: 1px solid yello;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment