<input type="number" id="sliderOutput1">
</div>
```
+
+---
+
+## Native Range Slider
+
+In Foundation 6.2, we introduced styles for `<input type="range">`, the native HTML element for range sliders. It's not supported in every browser, namely IE9 and some older mobile browsers. [View browser support for the range input type.](http://caniuse.com/#feat=input-range)
+
+```html_example
+<input type="range" min="1" max="100" step="1">
+```
+
+If you're using the Sass version of Foundation, add this line to your main Sass file:
+
+```scss
+@include foundation-range-input;
+```
+
+It's possible to use both the JavaScript slider and the native slider in the same codebase, as the CSS selectors used don't overlap. Here's what's different about the native slider:
+
+- Less markup: just write `<input type="range">` and you're good.
+- No JavaScript is needed, which guarantees it runs faster in most browsers.
+- To disable the slider, add `disabled` as an attribute, instead of a class.
+- No support for vertical orientation.
+- No support for two handles.
/// @group slider
////
-/// Default height of the slider.
-/// @type Number
-$slider-height: 0.5rem !default;
-
-/// Default slider width of a vertical slider.
+/// Default slider width of a vertical slider. (Doesn't apply to the native slider.)
/// @type Number
$slider-width-vertical: $slider-height !default;
-/// Default background color of the slider's track.
-/// @type Color
-$slider-background: $light-gray !default;
-
-/// Default color of the active fill color of the slider.
-/// @type Color
-$slider-fill-background: $medium-gray !default;
-
-/// Default height of the handle of the slider.
-/// @type Number
-$slider-handle-height: 1.4rem !default;
-
-/// Default width of the handle of the slider.
-/// @type Number
-$slider-handle-width: 1.4rem !default;
-
-/// Default color of the handle for the slider.
-/// @type Color
-$slider-handle-background: $primary-color !default;
-
-/// Default fade amount of a disabled slider.
-/// @type Number
-$slider-opacity-disabled: 0.25 !default;
-
-/// Default radius for slider.
-/// @type Number
-$slider-radius: $global-radius !default;
-
-/// Transition properties to apply to the slider handle and fill.
+/// Transition properties to apply to the slider handle and fill. (Doesn't apply to the native slider.)
/// @type Transition
$slider-transition: all 0.2s ease-in-out !default;
--- /dev/null
+/// Default height of the slider.
+/// @type Number
+$slider-height: 0.5rem !default;
+
+/// Default background color of the slider's track.
+/// @type Color
+$slider-background: $light-gray !default;
+
+/// Default color of the active fill color of the slider.
+/// @type Color
+$slider-fill-background: $medium-gray !default;
+
+/// Default height of the handle of the slider.
+/// @type Number
+$slider-handle-height: 1.4rem !default;
+
+/// Default width of the handle of the slider.
+/// @type Number
+$slider-handle-width: 1.4rem !default;
+
+/// Default color of the handle for the slider.
+/// @type Color
+$slider-handle-background: $primary-color !default;
+
+/// Default fade amount of a disabled slider.
+/// @type Number
+$slider-opacity-disabled: 0.25 !default;
+
+/// Default radius for slider.
+/// @type Number
+$slider-radius: $global-radius !default;
+
+@mixin foundation-range-input {
+ input[type="range"] {
+ $slider-background: $light-gray;
+ $slider-height: 0.5rem;
+ $slider-radius: 0px;
+ $slider-thumb-height: 1.4rem;
+ $slider-thumb-width: 1.4rem;
+ $slider-thumb-color: $primary-color;
+ $slider-opacity-disabled: 0.25;
+ $slider-fill-background: $medium-gray;
+
+ $margin: ($slider-thumb-height - $slider-height) / 2;
+
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ display: block;
+ width: 100%;
+ height: auto;
+ cursor: pointer;
+ margin-top: $margin;
+ margin-bottom: $margin;
+ border: 0;
+ line-height: 1;
+ margin-bottom: $global-margin;
+
+ @if has-value($slider-radius) {
+ border-radius: $slider-radius;
+ }
+
+ &:focus {
+ outline: 0;
+ }
+
+ &[disabled] {
+ opacity: $slider-opacity-disabled;
+ }
+
+ // Chrome/Safari
+ &::-webkit-slider-runnable-track {
+ height: $slider-height;
+ background: $slider-background;
+ }
+
+ &::-webkit-slider-thumb {
+ -webkit-appearance: none;
+ background: $slider-thumb-color;
+ width: $slider-thumb-width;
+ height: $slider-thumb-height;
+ margin-top: -$margin;
+
+ @if has-value($slider-radius) {
+ border-radius: $slider-radius;
+ }
+ }
+ // Firefox
+ &::-moz-range-track {
+ -moz-appearance: none;
+ height: $slider-height;
+ background: #ccc;
+ }
+ &::-moz-range-thumb {
+ -moz-appearance: none;
+ background: $slider-thumb-color;
+ width: $slider-thumb-width;
+ height: $slider-thumb-height;
+ margin-top: -$margin;
+
+ @if has-value($slider-radius) {
+ border-radius: $slider-radius;
+ }
+ }
+
+ // Internet Explorer
+ &::-ms-track {
+ height: $slider-height;
+ background: $slider-background;
+ color: transparent;
+ border: 0;
+ overflow: visible;
+ border-top: $margin solid $body-background;
+ border-bottom: $margin solid $body-background;
+ }
+
+ &::-ms-thumb {
+ background: $slider-thumb-color;
+ width: $slider-thumb-width;
+ height: $slider-thumb-height;
+ border: 0;
+
+ @if has-value($slider-radius) {
+ border-radius: $slider-radius;
+ }
+ }
+
+ &::-ms-fill-lower {
+ background: $slider-fill-background;
+ }
+
+ &::-ms-fill-upper {
+ background: $slider-background;
+ }
+
+ @at-root {
+ output {
+ line-height: $slider-thumb-height;
+ vertical-align: middle;
+ margin-left: 0.5em;
+ }
+ }
+ }
+}