Skip to content

Commit b78ea14

Browse files
committed
Add no-spinners utility to remove input spinners
Adds a new utility class .no-spinners to remove spinners from number inputs. Includes visual test in tests/visual/no-spinners.html and documentation in docs/5.3/utilities/misc.md. Implemented via a separate _no-spinners.scss file due to utilities API limitations with pseudo-elements like ::-webkit-inner-spin-button.
1 parent 9a01aa3 commit b78ea14

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
### No Spinners
2+
3+
The `.no-spinners` utility removes the spinner arrows from `<input type="number">` and similar elements across supported browsers (WebKit and Firefox).
4+
5+
```html
6+
<input type="number" class="form-control no-spinners" value="42">

tests/visual/no-spinners.html

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>Bootstrap Visual Test: No Spinners Utility</title>
7+
<link rel="stylesheet" href="/dist/css/bootstrap.css">
8+
</head>
9+
<body>
10+
<div class="container py-5">
11+
<h1>No Spinners Utility Test</h1>
12+
<p>Inputs below should not display spinners in supported browsers.</p>
13+
14+
<h2>Default Number Input (with spinners)</h2>
15+
<input type="number" class="form-control" value="42">
16+
17+
<h2>Number Input with .no-spinners</h2>
18+
<input type="number" class="form-control no-spinners" value="42">
19+
20+
<h2>Time Input with .no-spinners</h2>
21+
<input type="time" class="form-control no-spinners" value="13:37">
22+
</div>
23+
</body>
24+
</html>

0 commit comments

Comments
 (0)