Skip to content

Instantly share code, notes, and snippets.

@sugarenia
Created April 22, 2014 06:46
Show Gist options
  • Save sugarenia/11167641 to your computer and use it in GitHub Desktop.
Save sugarenia/11167641 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.5)
// Compass (v1.0.0.alpha.18)
// ----
@mixin progress_bar($steps) {
$width: (100/$steps)*1%;
@for $i from 1 through $steps {
[data-progress='#{$i}']:after {
width: $width*$i;
}
$steps: $steps - 1;
}
}
@include progress_bar(4);
[data-progress='1']:after {
width: 25%;
}
[data-progress='2']:after {
width: 50%;
}
[data-progress='3']:after {
width: 75%;
}
[data-progress='4']:after {
width: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment