Skip to content

Commit

Permalink
fancy range slider styles
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Jun 6, 2016
1 parent 3a23d5e commit 3854cba
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cljs/ulysses/components/basic.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@

(defn range-slider
[& {:keys [min max value on-change]}]
[:input {:type :range
[:input {:class :range-slider
:type :range
:min min
:max max
:value value
Expand Down
1 change: 1 addition & 0 deletions src/sass/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@
@import 'components/not-found';
@import 'components/center-message';
@import 'components/progress';
@import 'components/range-slider';
@import 'components/uconn-banner';
@import 'components/word-cloud';
88 changes: 88 additions & 0 deletions src/sass/components/_range-slider.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
.range-slider {
-webkit-appearance: none;
background: $gray-lighter;
width: 100%;
}

.range-slider:focus {
outline: none;
}

.range-slider::-webkit-slider-runnable-track {
// animate: .2s;
background: $white;
border-radius: 11px;
cursor: pointer;
height: 22px;
width: 100%;
}

.range-slider::-webkit-slider-thumb {
-webkit-appearance: none;
// border: 0;
// box-shadow: none;
background: $brand-primary;
border-radius: 9px;
cursor: pointer;
height: 18px;
margin-top: 2px;
width: 18px;
}

.range-slider:focus::-webkit-slider-runnable-track {
background: $white;
}

.range-slider::-moz-range-track {
// animate: .2s;
background: $white;
border-radius: 11px;
cursor: pointer;
height: 22px;
width: 100%;
}

.range-slider::-moz-range-thumb {
background: $brand-primary;
border-radius: 9px;
cursor: pointer;
height: 18px;
width: 18px;
}

.range-slider::-ms-track {
// animate: .2s;
background: transparent;
border-color: transparent;
color: transparent;
cursor: pointer;
height: 22px;
width: 100%;
}

.range-slider::-ms-fill-lower {
background: $white;
border-radius: 22px;
}

.range-slider::-ms-fill-upper {
background: $white;
border: 0;
border-radius: 22px;
}

.range-slider::-ms-thumb {
background: $brand-primary;
border-radius: 9px;
cursor: pointer;
height: 18px;
width: 18px;
}

.range-slider:focus::-ms-fill-lower {
background: $white;
}

.range-slider:focus::-ms-fill-upper {
background: $white;
}

0 comments on commit 3854cba

Please sign in to comment.