Last active
December 30, 2015 01:49
-
-
Save lemnis/7758950 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$color-value: green; | |
$border-radius-value: 20px; | |
$box-shadow-value: inset 5px 5px 5px red; | |
@mixin progress{ | |
-webkit-appearance: none; | |
border: none; | |
width: 160px; | |
height: 16px; | |
overflow: hidden; | |
&::-webkit-progress-bar{ | |
background: transparent; | |
} | |
&::-webkit-progress-value{ | |
@content; | |
} | |
&::-moz-progress-bar{ | |
@content; | |
} | |
&::-ms-fill{ | |
@content; | |
} | |
} | |
@mixin range-track{ | |
&::-webkit-slider-runnable-track{ | |
-webkit-appearance: none; | |
@content; | |
} | |
&::-moz-range-track{ | |
@content; | |
} | |
&::-ms-track, &::-ms-fill-lower { | |
border: 0; | |
@content; | |
} | |
} | |
@mixin range-thumb{ | |
&::-webkit-slider-thumb{ | |
-webkit-appearance: none; | |
@content; | |
} | |
&::-moz-range-thumb{ | |
border: 0; | |
@content; | |
} | |
&::-ms-tooltip { | |
display: none; | |
} | |
&::-ms-thumb { | |
@content; | |
} | |
} | |
progress{ | |
background: red; | |
border-radius: 30px; | |
@include progress{ | |
background: yellow; | |
border-radius: 3px; | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$progress-width: 160px; | |
$progress-height: 16px; | |
$color-bar: lightsalmon; | |
$color-value: yellow; | |
$border-radius-bar: 20px; | |
$border-radius-value: 20px; | |
$box-shadow-bar: 3px 3px 5px red; | |
$box-shadow-value: inset 5px 5px 5px red; | |
@mixin progress{ | |
-webkit-appearance: none; | |
border: none; | |
width: $progress-width; | |
height: $progress-height; | |
overflow: hidden; | |
background: $color-bar; | |
border-radius: $border-radius-bar; | |
box-shadow: $box-shadow-bar; | |
&::-webkit-progress-bar{ | |
background: transparent; | |
} | |
&::-webkit-progress-value{ | |
background: $color-value; | |
border-radius: $border-radius-value; | |
box-shadow: $box-shadow-value; | |
} | |
&::-moz-color-bar{ | |
background: $color-value; | |
border-radius: $border-radius-value; | |
box-shadow: $box-shadow-value; | |
} | |
&::-ms-fill{ | |
background: $color-value; | |
border-radius: $border-radius-value; | |
box-shadow: $box-shadow-value; | |
} | |
} | |
progress{ | |
@include progress; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment