Skip to content

Commit ea4bebc

Browse files
Formatting modifications of range.mdx
1 parent bf78061 commit ea4bebc

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

site/src/content/docs/forms/range.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ toc: true
66

77
## Overview
88

9-
Create custom `<input type="range">` controls with `.form-range`. The track (the background) and thumb (the value) are both styled to appear the same across browsers. As only Firefox supports "filling" their track from the left or right of the thumb as a means to visually indicate progress, we do not currently support it.
9+
Create custom `<input type="range">` controls with `.form-range`. The track (the background) and thumb (the value) are both styled to appear the same across browsers. As only Firefox supports filling their track from the left or right of the thumb as a means to visually indicate progress, we do not currently support it.
1010

1111
<Example code={`<label for="customRange1" class="form-label">Example range</label>
1212
<input type="range" class="form-range" id="customRange1">`} />
@@ -27,7 +27,7 @@ Range inputs have implicit values for `min` and `max`—`0` and `100`, respectiv
2727

2828
## Steps
2929

30-
By default, range inputs "snap" to integer values. To change this, you can specify a `step` value. In the example below, we double the number of steps by using `step="0.5"`.
30+
By default, range inputs snap to integer values. To change this, you can specify a `step` value. In the example below, we double the number of steps by using `step="0.5"`.
3131

3232
<Example code={`<label for="customRange3" class="form-label">Example range</label>
3333
<input type="range" class="form-range" min="0" max="5" step="0.5" id="customRange3">`} />
@@ -37,21 +37,21 @@ By default, range inputs "snap" to integer values. To change this, you can speci
3737
The value of the range input can be shown using the `output` element and a bit of JavaScript.
3838

3939
<Example code={`<label for="customRange4" class="form-label">Example range</label>
40-
<input type="range" class="form-range" min="0" max="100" value="50" id="customRange4">
41-
<output for="customRange4" id="rangeValue"></output>
40+
<input type="range" class="form-range" min="0" max="100" value="50" id="customRange4">
41+
<output for="customRange4" id="rangeValue"></output>
4242
43-
<script>
43+
<script>
4444
// This is an example script, please modify as needed
4545
const rangeInput = document.getElementById('customRange4');
4646
const rangeOutput = document.getElementById('rangeValue');
4747
4848
// Set initial value
49-
rangeOutput.textContent = rangeInput.value;
49+
rangeOutput.textContent = rangeInput.value;
5050
5151
rangeInput.addEventListener('input', function() {
5252
rangeOutput.textContent = this.value;
5353
});
54-
</script>`} />
54+
</script>`} />
5555

5656
## CSS
5757

0 commit comments

Comments
 (0)