Skip to content

Instantly share code, notes, and snippets.

@ColemanCollins
Created October 25, 2012 18:40
Show Gist options
  • Save ColemanCollins/3954579 to your computer and use it in GitHub Desktop.
Save ColemanCollins/3954579 to your computer and use it in GitHub Desktop.
Extra Progress Bar Haml and CSS
//this is the haml structure—make sure you replace COUNTER VARIABLE with the actual variable.
#progress.gray
#progress-outer
#progress-inner{style: "height: 100%; width: #{ (5) + ((COUNTER VARIABLE / 200) * 95) }% ;"}
.count= COUNTER VARIABLE
.goalcount="2,000"
//matching CSS, to go at the bottom of the current css file. You can re-namespace and recolor as you see fit, just make sure that .gray class matches the haml.
.gray #progress-inner, .gray #progress-inner::before, .gray #progress-inner::after{
background:#333;
}
.gray .goalcount {
color:#333;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment