Skip to content

Commit

Permalink
fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Wikiki committed Jun 30, 2020
1 parent ac31165 commit d53512d
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 33 deletions.
2 changes: 1 addition & 1 deletion dist/css/bulma-slider.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bulma-slider",
"version": "2.0.1",
"version": "2.0.2",
"description": "Display classic slider more sexy, in different colors, sizes, and states ",
"main": "dist/js/bulma-slider.min.js",
"style": "dist/css/bulma-slider.min.css",
Expand Down
123 changes: 92 additions & 31 deletions src/sass/index.sass
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,44 @@ $slider-output-radius: $radius !default

&:not([orient="vertical"])
min-height: calc(( #{$size} + 2px ) * 1.25)
&::-webkit-slider-runnable-track,
&::-moz-range-track,

&::-webkit-slider-runnable-track
height: $track-height
&::-moz-range-track
height: $track-height
&::-ms-track
height: $track-height

&[orient="vertical"]
&::-webkit-slider-runnable-track,
&::-moz-range-track,
&::-webkit-slider-runnable-track
width: $track-height
&::-moz-range-track
width: $track-height
&::-ms-track
width: $track-height

&::-webkit-slider-thumb,
&::-moz-range-thumb,
&::-webkit-slider-thumb
height: $thumb-size
width: $thumb-size
&::-moz-range-thumb
height: $thumb-size
width: $thumb-size
&::-ms-thumb
height: $thumb-size
width: $thumb-size

&::-ms-thumb
margin-top: 0

&::-webkit-slider-thumb
margin-top: -( $thumb-size / 4 )
margin-top: -($thumb-size / 4)

&[orient="vertical"]
&::-webkit-slider-thumb
margin-top: auto
margin-left: -( $thumb-size / 4 )
margin-left: -($thumb-size / 4)

input[type=range]
input[type="range"]
&.slider
appearance: none
margin: 1rem 0
Expand All @@ -60,8 +70,10 @@ input[type=range]
outline: none

&:not([orient="vertical"])
&::-webkit-slider-runnable-track,
&::-moz-range-track,
&::-webkit-slider-runnable-track
width: 100%
&::-moz-range-track
width: 100%
&::-ms-track
width: 100%

Expand All @@ -71,7 +83,7 @@ input[type=range]
width: $slider-output-width
background: $slider-output-background
border-radius: $slider-output-radius
padding: .4rem .8rem
padding: 0.4rem 0.8rem
font-size: $size-7
line-height: $size-7
text-align: center
Expand All @@ -81,96 +93,145 @@ input[type=range]
overflow: hidden
pointer-events: none
z-index: 200

&:disabled + output
opacity: 0.5

&.has-output
display: inline-block
vertical-align: middle
width: calc(100% - ( #{$slider-output-width + 1.2rem } ))
width: calc(100% - ( #{$slider-output-width + 1.2rem} ))

+ output
display: inline-block
margin-left: .75rem
margin-left: 0.75rem
vertical-align: middle

&.has-output-tooltip
display: block

+ output
position: absolute
left: 0
top: -.1rem
top: -0.1rem

&[orient="vertical"]
appearance: slider-vertical
writing-mode: bt-lr
&::-webkit-slider-runnable-track,
&::-moz-range-track,

&::-webkit-slider-runnable-track
height: 100%
&::-moz-range-track
height: 100%
&::-ms-track
height: 100%

&::-webkit-slider-runnable-track,
&::-moz-range-track,
&::-webkit-slider-runnable-track
cursor: pointer
animate: 0.2s
box-shadow: $slider-track-shadow
background: $slider-track-background
border-radius: $slider-track-radius
border: $slider-track-border
&::-moz-range-track
cursor: pointer
animate: 0.2s
box-shadow: $slider-track-shadow
background: $slider-track-background
border-radius: $slider-track-radius
border: $slider-track-border
&::-ms-track
cursor: pointer
animate: 0.2s
box-shadow: $slider-track-shadow
background: $slider-track-background
border-radius: $slider-track-radius
border: $slider-track-border
&::-ms-fill-lower,

&::-ms-fill-lower
background: $grey-lighter
border-radius: $slider-radius
&::-ms-fill-upper
background: $grey-lighter
border-radius: $slider-radius

&::-webkit-slider-thumb,
&::-moz-range-thumb,
&::-webkit-slider-thumb
box-shadow: $slider-thumb-shadow
border: $slider-thumb-border
border-radius: $slider-thumb-radius
background: $slider-thumb-background
cursor: pointer
&::-moz-range-thumb
box-shadow: $slider-thumb-shadow
border: $slider-thumb-border
border-radius: $slider-thumb-radius
background: $slider-thumb-background
cursor: pointer
&::-ms-thumb
box-shadow: $slider-thumb-shadow
border: $slider-thumb-border
border-radius: $slider-thumb-radius
background: $slider-thumb-background
cursor: pointer

&::-webkit-slider-thumb
appearance: none

&.is-circle
&::-webkit-slider-thumb,
&::-moz-range-thumb,
&::-webkit-slider-thumb
border-radius: $radius-rounded
&::-moz-range-thumb
border-radius: $radius-rounded
&::-ms-thumb
border-radius: $radius-rounded

&:active
&::-webkit-slider-thumb,
&::-moz-range-thumb,
&::-webkit-slider-thumb
transform: scale(1.25)
&::-moz-range-thumb
transform: scale(1.25)
&::-ms-thumb
transform: scale(1.25)

&:disabled
opacity: 0.5
cursor: not-allowed
&::-webkit-slider-thumb,
&::-moz-range-thumb,

&::-webkit-slider-thumb
cursor: not-allowed
transform: scale(1)
&::-moz-range-thumb
cursor: not-allowed
transform: scale(1)
&::-ms-thumb
cursor: not-allowed
transform: scale(1)

+slider-size($size-normal)

&.is-small
+slider-size($size-small)

&.is-medium
+slider-size($size-medium)

&.is-large
+slider-size($size-large)

@each $name, $pair in $colors
$color: nth($pair, 1)
$color-invert: nth($pair, 2)

&.is-#{$name}
&::-moz-range-track,
&::-webkit-slider-runnable-track,
&::-moz-range-track
background: $color !important
&::-webkit-slider-runnable-track
background: $color !important
&::-ms-track
background: $color !important
&::-ms-fill-lower,

&::-ms-fill-lower
background: $color
&::-ms-fill-upper
background: $color

Expand Down
1 change: 1 addition & 0 deletions test/css/bulma-slider.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d53512d

Please sign in to comment.