Skip to content

Instantly share code, notes, and snippets.

@KatieK2
Created November 19, 2013 18:41
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 KatieK2/7550271 to your computer and use it in GitHub Desktop.
Save KatieK2/7550271 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
@mixin flex_percentage($className) {
@for $i from 1 through 100 {
@if $i % 5 == 0 {
.#{$className}#{$i} {
width: $i * 1%;
}
}
}
}
@include flex_percentage(p);
.p5 {
width: 5%; }
.p10 {
width: 10%; }
.p15 {
width: 15%; }
.p20 {
width: 20%; }
.p25 {
width: 25%; }
.p30 {
width: 30%; }
.p35 {
width: 35%; }
.p40 {
width: 40%; }
.p45 {
width: 45%; }
.p50 {
width: 50%; }
.p55 {
width: 55%; }
.p60 {
width: 60%; }
.p65 {
width: 65%; }
.p70 {
width: 70%; }
.p75 {
width: 75%; }
.p80 {
width: 80%; }
.p85 {
width: 85%; }
.p90 {
width: 90%; }
.p95 {
width: 95%; }
.p100 {
width: 100%; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment