$track-color: #E5E7EA; $thumb-color: #606871; $thumb-radius: 8px; $thumb-height: 14px; $thumb-width: 14px; $thumb-border-width: 1px; $thumb-border-color: white; $track-width: 100%; $track-height: 4px; $track-shadow-size: 2px; $track-shadow-blur: 2px; $track-shadow-color: #222; $track-border-width: 0px; $track-border-color: black; $track-radius: 5px; $contrast: 5%; @mixin track(){ width: $track-width; height: $track-height; cursor: pointer; animate: 0.2s; } @mixin thumb(){ border: $thumb-border-width solid $thumb-border-color; height: $thumb-height; width: $thumb-width; border-radius: $thumb-radius; background: $thumb-color; cursor: pointer; } .affiliate-input-range { display: flex; > *:not(:last-child){ margin-right: 8px; } input[type="number"]{ width: 55px !important; } input[type=range] { -webkit-appearance: none; margin-top: $thumb-height/2; margin-bottom: $thumb-height/2; width: $track-width; padding-left: 0; padding-right: 0; background: transparent; &::-webkit-slider-runnable-track { @include track(); background: $track-color; border-radius: $track-radius; border: $track-border-width solid $track-border-color; } &::-webkit-slider-thumb { @include thumb(); -webkit-appearance: none; margin-top: ((-$track-border-width * 2 + $track-height) / 2) - ($thumb-height / 2); } &:focus::-webkit-slider-runnable-track { background: lighten($track-color, $contrast); } &::-moz-range-track { @include track(); background: $track-color; border-radius: $track-radius; border: $track-border-width solid $track-border-color; } &::-moz-range-thumb { @include thumb(); } &::-ms-track { @include track(); background: transparent; border-color: transparent; border-width: $thumb-width 0; color: transparent; } &::-ms-fill-lower { background: darken($track-color, $contrast); border: $track-border-width solid $track-border-color; border-radius: $track-radius*2; } &::-ms-fill-upper { background: $track-color; border: $track-border-width solid $track-border-color; border-radius: $track-radius*2; } &::-ms-thumb { @include thumb(); } &:focus::-ms-fill-lower { background: $track-color; } &:focus::-ms-fill-upper { background: lighten($track-color, $contrast); } } } .affiliate-field-range > label{ width: 100%; margin-bottom: 2px; }