-
-
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
Add styling for <input type="range"> #17916
Comments
This would fall under the "Custom form elements" (http://v4-alpha.getbootstrap.com/components/forms/#custom-forms ) and would be particularly challenging since it'd require JavaScript. |
Javascript would be nice but only styling would be much helpful. If a project has input type=range component, it will stand out due to lack of css style. <input type="range" min="0" max="100" value="0" step="20" name="result" list="grade"> |
Since bootstrap v4 has dropped support for IE8 and range input is supported in IE10+ there is quite reasonable way to do it without any javascript code: https://css-tricks.com/styling-cross-browser-compatible-range-inputs-css/ The question is if it's worth doing? It involves quite a lot of code specified for almost every browser engine.... For me custom styling would be helpfull, but will it be usefull for the rest of users? |
This example doesn't seem (to me) to include the styling for the step attribute. |
Are you talking about step attribute + datalist element, to generate ticks for sliders? Currently native styling for datalists is unstable and it's support is weak. But what can be done to style these ticks, is to use datalist as a standard markup and generate manually these ticks using plain css. I've done this using flex and space-between justification. |
Sounds interesting. Can you post an example? |
This is very quick example how it was done: https://jsbin.com/mozirozasi/edit?html,css,output I know that it's not pixel perfect and so on, and I didn't hide datalist values in a proper way, but I haven't got enough time. The most interesting part for you is follwing: datalist {
display: flex;
justify-content: space-between;
} |
Thanks for the example. I hope something related to this comes with the next bootstrap. |
Hi, Thanks, |
Custom range was added in #25600. |
No description provided.
The text was updated successfully, but these errors were encountered: