oldboy
oldboy

Reputation: 5954

Remove browser specific style

Browsers have added additional functionality/styling to input[type=number] in the form of up and down buttons.

I was able to remove this styling in Chrome since we're able to view the shadow DOM and figure out an element's corresponding identity.

However, Firefox is another story. Is anybody aware of any way to remove the up and down buttons on input[type=number] in Firefox?

I came across this post, but the extension wasn't sufficient.

Upvotes: 1

Views: 549

Answers (1)

Sandeep C. Nath
Sandeep C. Nath

Reputation: 927

/* For Firefox */
input[type='number'] {
-moz-appearance:textfield;
}
/* Webkit browsers like Safari and Chrome */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}

Upvotes: 2

Related Questions