-
-
Notifications
You must be signed in to change notification settings - Fork 79k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V4.1: Custom range control #23380
V4.1: Custom range control #23380
Changes from 4 commits
0102160
c02fa07
8d8663a
0355a31
7198dd2
126f731
e9f63e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -253,3 +253,110 @@ | |
} | ||
} | ||
} | ||
|
||
// Range | ||
// | ||
// Replace the browser default range with a custom one. | ||
.custom-range { | ||
width: 100%; | ||
padding-left: 0; | ||
background-color: transparent; | ||
-webkit-appearance: none; | ||
|
||
&:focus { | ||
outline: none; | ||
|
||
&::-webkit-slider-thumb, | ||
&::-moz-range-thumb, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line contains trailing whitespace |
||
&::-ms-thumb { | ||
box-shadow: $custom-control-indicator-focus-box-shadow; | ||
} | ||
} | ||
|
||
&::-moz-focus-inner, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line contains trailing whitespace |
||
&:-moz-focusring { | ||
border: 0; | ||
outline: none; | ||
} | ||
|
||
&:active { | ||
|
||
&::-webkit-slider-thumb, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line contains trailing whitespace |
||
&::-moz-range-thumb, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line contains trailing whitespace |
||
&::-ms-thumb { | ||
background-color: $custom-control-indicator-active-bg; | ||
} | ||
} | ||
|
||
// webkit styling | ||
&::-webkit-slider-thumb { | ||
width: $custom-control-indicator-size; | ||
height: $custom-control-indicator-size; | ||
margin-top: -($custom-control-indicator-size * .25); | ||
background-color: $custom-control-indicator-checked-bg; | ||
border: 0; | ||
border-radius: $custom-control-indicator-size; | ||
-webkit-appearance: none; | ||
} | ||
|
||
&::-webkit-slider-runnable-track { | ||
width: 100%; | ||
height: $custom-control-indicator-size * .5; | ||
color: transparent; | ||
cursor: pointer; | ||
background-color: $custom-control-indicator-bg; | ||
border-color: transparent; | ||
border-radius: $custom-control-indicator-size; | ||
} | ||
|
||
// firefox styling | ||
&::-moz-range-thumb { | ||
width: $custom-control-indicator-size; | ||
height: $custom-control-indicator-size; | ||
background-color: $custom-control-indicator-checked-bg; | ||
border: 0; | ||
border-radius: $custom-control-indicator-size; | ||
-webkit-appearance: none; | ||
} | ||
|
||
&::-moz-range-track { | ||
width: 100%; | ||
height: $custom-control-indicator-size * .5; | ||
color: transparent; | ||
cursor: pointer; | ||
background-color: $custom-control-indicator-bg; | ||
border-color: transparent; | ||
border-radius: $custom-control-indicator-size; | ||
} | ||
|
||
// IE styling | ||
&::-ms-thumb { | ||
width: $custom-control-indicator-size; | ||
height: $custom-control-indicator-size; | ||
background-color: $custom-control-indicator-checked-bg; | ||
border: 0; | ||
border-radius: $custom-control-indicator-size; | ||
-webkit-appearance: none; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this should be unprefixed and let autoprefixer do its thing. The same goes for other prefixes. |
||
} | ||
|
||
&::-ms-track { | ||
width: 100%; | ||
height: $custom-control-indicator-size * .5; | ||
color: transparent; | ||
cursor: pointer; | ||
background-color: transparent; | ||
border-color: transparent; | ||
border-width: ($custom-control-indicator-size * .5); | ||
} | ||
|
||
&::-ms-fill-lower { | ||
background-color: $custom-control-indicator-bg; | ||
border-radius: $custom-control-indicator-size; | ||
} | ||
|
||
&::-ms-fill-upper { | ||
margin-right: 15px; | ||
background-color: $custom-control-indicator-bg; | ||
border-radius: $custom-control-indicator-size; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line contains trailing whitespace