Closed
Conversation
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.
from number inputs. Includes visual test in tests/visual/no-spinners.html and documentation in docs/5.3/utilities/misc.md.
…strap into feature/no-spinners
Member
|
We'll pass on this, but yes, some form controls need revisiting in v6. In general as a quick review here too—we don't need mixins for vendor prefixing, we wouldn't need a new helper for this, this could be a modifier class on form controls. The issues you linked are over 10 years old, and the other spinners issue is unrelated. Thanks though! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces a new helper class, .no-spinners, to the
Bootstrap framework. The purpose of this utility is to remove the spinner
arrows (increment/decrement controls) from
elements and similar input types across supported browsers, providing a
cleaner visual appearance while preserving the input's numeric functionality.
Motivation & Context
This change is required to address a common customization need in web
development: removing the spinner arrows (increment/decrement controls)
from elements and similar input types. Bootstrap
currently lacks a built-in utility to control this aspect of form inputs, leaving
developers to implement custom CSS outside the framework. By adding the
.no-spinners helper, Bootstrap provides a standardized, reusable solution that
aligns with its philosophy of offering flexible, ready-to-use utilities for
common styling tasks. This enhances the framework’s utility suite, reduces
the need for external overrides, and ensures consistency across projects that
rely on Bootstrap.
The .no-spinners helper solves several problems faced by developers:
Type of changes
Checklist
npm run lint)Live previews
Related issues
This pull request addresses a recurring need in the Bootstrap community for controlling the appearance of spinner arrows in
<input type="number">elements. Below are some related issues and discussions from the Bootstrap GitHub repository:Issue input[type="number"] not displaying properly in Chrome #8350:
input[type="number"]not displaying properly in Chrome (Opened June 29, 2013)<input type="number">rendering, including spinner visibility issues in Chrome. A suggested fix involved CSS targeting::-webkit-outer-spin-buttonand::-webkit-inner-spin-button, similar to this PR’s approach.Issue Spinner inside input #28600: Spinner inside input (Opened April 1, 2019)
General Community Feedback: Frequent discussions on Stack Overflow and forums highlight the need for spinner removal, often using custom CSS. This PR formalizes that solution within Bootstrap.