close
The Wayback Machine - https://web.archive.org/web/20220413045446/https://github.com/tailwindlabs/tailwindcss/discussions/3275
Skip to content

New utility for hiding num input spin buttons #3275

Telluu started this conversation in Ideas
New utility for hiding num input spin buttons #3275
Jan 5, 2021 · 2 comments · 1 reply

Howdy, what do you guys think about adding a class like this:

.spin-button-none::-webkit-outer-spin-button,
.spin-button-none::-webkit-inner-spin-button {
  appearance: none;
}

Class name of course can be different. The idea is that the already available class apperance-none doesn't apply it to spin buttons for input of type number.

And yup, i made a custom utility just like the one above and it works, but its just an idea to maybe add it to the framework? What do you guys think.

Replies

2 comments
·
1 reply

Would you also need something like this to work with firefox?

.spin-button-none {
    -moz-appearance: textfield;
}
1 reply
@bigsaigon333

That's what I always do with numeric input elements in Firefox!! 👍

Yup, much needed. Some of my projects needed this. Esp with ZIP inputs.

0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
4 participants