Skip to content

Commit

Permalink
Remove spin buttons on number input fields in Firefox (fixes #103). (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
junhaoliao authored Oct 24, 2024
1 parent bc8109f commit 84ee0d9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/components/MenuBar/PageNumInput.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@
white-space: nowrap;
}

.page-num-input input::-webkit-outer-spin-button,
.page-num-input input::-webkit-inner-spin-button {
/* Remove the spin buttons (up/down arrows) on number input fields for WebKit-based browsers.
NOTE: This approach does not work for Firefox Browser. See the next rule for mitigation. */
.page-num-input input[type="number"]::-webkit-outer-spin-button,
.page-num-input input[type="number"]::-webkit-inner-spin-button {
margin: 0;
appearance: none;
}

/* Show number input fields as `textfield` to remove the spin buttons for Firefox Browser. */
.page-num-input input[type="number"] {
appearance: textfield;
}

.page-num-input-num-pages-text {
font-size: inherit !important;
}
Expand Down

0 comments on commit 84ee0d9

Please sign in to comment.