appearance-none utility does not hide input number arrows #2173
Replies: 5 comments 2 replies
-
This is just how CSS works, |
Beta Was this translation helpful? Give feedback.
-
Yeah is true, it almost feels like its an over all input type sort of deal, since the same renders true with |
Beta Was this translation helpful? Give feedback.
-
If someone is looking for a solution: @layer utilities {
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
@apply appearance-none;
}
} |
Beta Was this translation helpful? Give feedback.
-
@binajmen thanks, That code makes the work done, also it must go on Tailwinds.css, in Laravel you can find it on the folder called Resources->app.css, copy paste the code there |
Beta Was this translation helpful? Give feedback.
-
@layer base { |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the problem:
When using an
input
of typenumber
with theappearance-none
utility, browser-based arrows still appear. This seems to be counter to the description of.appearance-none
, which is described as:Link to a minimal reproduction:
https://codepen.io/bswinnerton/pen/XWddGPR, where the arrows can be seen on hover:
It's worth pointing out that #1101 discussed this and the guidance was to create a custom utility to solve this problem. I'm wondering if perhaps
appearance-none
didn't exist then and if it would be considered to add the ability to suppress these arrows inappearance-none
, or perhaps update the documentation to call out that number-basedinput
s are not supported.Beta Was this translation helpful? Give feedback.
All reactions