<link href='https://fonts.googleapis.com/css?family=Lato:100,300,400,700,300italic,400italic,700italic' rel='stylesheet' type='text/css'>
<section class="progress_status">
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"><p>Customizable Progress Bar</p>
</div>
</div>
</section>
<section id="checkboxes">
<ul>
<li class="controls">
<input class="styled-checkbox" id="checkbox1" type="checkbox" value="20"><label for="checkbox1"></label>
</li>
<li class="controls">
<input class="styled-checkbox" id="checkbox2" type="checkbox" value="20"><label for="checkbox2"></label>
</li>
<li class="controls">
<input class="styled-checkbox" id="checkbox3" type="checkbox" value="20"><label for="checkbox3"></label>
</li>
<li class="controls">
<input class="styled-checkbox" id="checkbox4" type="checkbox" value="20"><label for="checkbox4"></label>
</li>
<li class="controls">
<input class="styled-checkbox" id="checkbox5" type="checkbox" value="20"><label for="checkbox5"></label>
</li>
</ul>
</section>
@import "compass/css3";
//SASS VARIABLES
$progressColor: #BF5FFF;
$lato: 'Lato', sans-serif;
$white: #FFFFFF;
//SASS MIXINS
@mixin square($box) {
width: $box;
height: $box;
}
//MAIN STYLES
body {
background-image: url("http://www.userlogos.org/files/backgrounds/ctach1991/Clouds2560x1600.jpg");
-webkit-background-size: cover;
background-size: cover;
}
.progress_status {
float: left;
width: 100%;
padding: 0px 0px 0px 0px;
.progress {
float: left;
width: 100%;
height: 100px;
@include border-radius(0px);
background-color: lighten($progressColor, 20%);
.progress-bar {
background-color: $progressColor;
p {
position: absolute;
top: 0px;
left: 0px;
right: 0px;
font-size: 6em;
text-transform: uppercase;
font-family: $lato;
font-weight: 200;
line-height: 1.4em;
color: #ffffff;
@media only screen and (min-width:993px) and (max-width:1200px) {
top: 20px;
font-size: 4em;
}
@media only screen and (min-width:768px) and (max-width:992px) {
top: 30px;
font-size: 3em;
}
@media only screen and (min-width:0px) and (max-width:767px) {
display: none;
}
}
}
}
}
#checkboxes {
float: left;
width: 100%;
height: auto;
position: absolute;
top: 135px;
left: 0px;
right: 0px;
z-index: 5;
background-color: #888888;
padding: 15px 0px 10px 0px;
margin-top: -35px;
border-top: 1px solid #FFFFFF;
border-bottom: 1px solid #FFFFFF;
ul {
width: 153px;
margin-left: auto;
margin-right: auto;
}
}
.controls {
float: left;
}
:not(#x) .styled-checkbox {
position: absolute;
opacity: 0;
& + label {
position: relative;
cursor: pointer;
padding: 0;
}
& + label:before {
content: '';
margin-right: 10px;
display: inline-block;
vertical-align: text-top;
@include square(20px);
background: $white;
}
&:focus + label:before,
&:hover + label:before {
background: $progressColor;
box-shadow: 0 0 0 6px rgba(0,0,0,0.13);
}
&:checked + label:before {
background: $progressColor;
}
// DISABLED
&.disabled + label,
&[disabled] + label {
color: #b8b8b8;
}
&.disabled + label:before,
&[disabled] + label:before {
box-shadow: none;
background: #ddd;
}
// THE CHECKMARK IMAGE
&:checked + label:after {
content: '';
position: absolute;
left: 6px;
top: 9px;
background: $white;
@include square(2px);
box-shadow:
2px 0 0 $white,
4px 0 0 $white,
4px -2px 0 $white,
4px -4px 0 $white,
4px -6px 0 $white;
@include rotate(40deg);
}
}
View Compiled
//@thomasjwicker --> www.thomaswicker.com
$('#checkboxes ul li input').on('click', function() {
var emptyValue = 0;
$('#checkboxes ul li input:checked').each(function() {
emptyValue += parseInt($(this).val());
});
$('.progress-bar').css('width', emptyValue + '%').attr('aria-valuenow', emptyValue);
});