Skip to content

Instantly share code, notes, and snippets.

@adamsir
Created September 26, 2014 13:31
Show Gist options
  • Save adamsir/cd8dd2e1d09a54d0e118 to your computer and use it in GitHub Desktop.
Save adamsir/cd8dd2e1d09a54d0e118 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v2.0.0)
// ----
$homepage-stripe-feature__count: 2;
@mixin create-class-image($class, $iterator, $extension:'jpg', $extend: ()) {
&.#{$class}-#{$iterator} {
background-image: url('../i/#{$class}-#{$iterator}.#{$extension}');
@include expand-list-map($extend);
}
}
@mixin create-class($class, $iterator, $extend) {
&.#{$class}-#{$iterator} {
@include expand-list-map($extend);
}
}
@mixin expand-list-map($list) {
@each $value in $list {
#{nth($value, 1)}: nth($value, 2);
}
}
@mixin content-section-background($class, $nth-child:'all', $steps: 4, $extension:'jpg', $extend: (), $type: 'image' ) {
@for $i from 1 through $steps {
@if($nth-child == 'all') {
@if($type == "pure") {
@include create-class($class,$i,$extend);
} @else {
@include create-class-image($class,$i,$extension, $a);
}
}
@if($nth-child == 'even') {
@if($i % 2 == 0) {
@include create-class-image($class,$i,$extension);
}
}
@if($nth-child == 'odd') {
@if($i % 2 != 0) {
@include create-class-image($class,$i,$extension);
}
}
}
}
$a: (
text-transform none,
text-shadow none,
padding-top 100px,
);
.stripe {
@include content-section-background('stripe-homepage', 'all', 1 , 'png', $a);
@include content-section-background('stripe-pica', 'all', 1 , 'png', $a, 'pure');
}
.stripe.stripe-homepage-1 {
background-image: url('../i/stripe-homepage-1.png');
text-transform: none;
text-shadow: none;
padding-top: 100px; }
.stripe.stripe-pica-1 {
text-transform: none;
text-shadow: none;
padding-top: 100px; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment