Hide input[type=number] spin buttons and fix text alignment

This commit is contained in:
cryptogopher 2025-01-04 16:17:45 +01:00
parent ed0234f158
commit d86e38a3ec
2 changed files with 16 additions and 1 deletions

View File

@ -66,6 +66,10 @@ textarea {
background-color: inherit;
font: inherit;
}
input,
select {
text-align: inherit;
}
/* blue - target for interaction with pointer */
@ -153,6 +157,17 @@ input[type=checkbox]:checked {
appearance: checkbox;
-webkit-appearance: checkbox;
}
/* Hide spin buttons in input number fields */
input[type=number] {
-moz-appearance: textfield;
}
input::-webkit-inner-spin-button {
-webkit-appearance: none;
}
input::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
input:hover,
select:hover,
textarea:hover {

View File

@ -8,7 +8,7 @@
<td>
<%= form.text_area :description, cols: 30, rows: 1, escape: false %>
</td>
<td>
<td class="number">
<% unless @unit.base.nil? %>
<%= form.hidden_field :base_id %>
<%= form.number_field :multiplier, required: true, size: 10, min: :step %>