Use a number field, and improve focus styles

This commit is contained in:
Jason Zimdars
2025-04-08 16:20:02 -05:00
parent f6288ca026
commit df408bfd03
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -468,9 +468,11 @@
}
.input.boost__input {
--hover-size: 0;
--input-border-radius: 0;
--input-border-size: 0;
--input-padding: 0;
--outline-size: 0;
color: inherit;
font-size: inherit;
@@ -483,6 +485,16 @@
field-sizing: content;
max-inline-size: unset;
}
&:focus {
background-color: var(--color-highlight);
}
&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
}
.card__popped {
+1 -1
View File
@@ -1,6 +1,6 @@
<%= form_with url: bubble_boosts_path(bubble), class: "pad-inline flex align-center gap" do %>
<span class="overflow-ellipsis">
<strong><%= text_field_tag :boost_count, bubble.boosts_count, min: 1, class: "boost__input input", autocomplete: "off" %></strong>
<strong><%= number_field_tag :boost_count, bubble.boosts_count, min: 1, class: "boost__input input", autocomplete: "off" %></strong>
<span><%= bubble.boosts_count == 1 ? "boost" : "boosts" %></span>
</span>
<%= tag.button class: "btn", type: :submit, style: "font-size: 0.4em" do %>