Improve display when label is long

(ie. longer than the available screen width)
This commit is contained in:
Jean-Baptiste Bellet
2022-01-13 11:05:44 +01:00
parent 72edd9fa36
commit f78ff3fc3b
3 changed files with 11 additions and 2 deletions

View File

@@ -72,7 +72,7 @@
- ship_method_description = nil
- @shipping_methods.each do |shipping_method|
%div.checkout-input
%div.checkout-input.checkout-input-radio
= fields_for shipping_method do |shipping_method_form|
= shipping_method_form.radio_button :name, shipping_method.id,
id: "shipping_method_#{shipping_method.id}",

View File

@@ -5,7 +5,7 @@
- selected_payment_method = @order.payments&.with_state(:checkout)&.first&.payment_method_id
- available_payment_methods.each do |payment_method|
%div.checkout-input
%div.checkout-input.checkout-input-radio
= f.radio_button :payment_method_id, payment_method.id,
id: "payment_method_#{payment_method.id}",
name: "order[payments_attributes][][payment_method_id]",

View File

@@ -131,6 +131,15 @@
color: $teal-400;
text-decoration: underline;
}
&.checkout-input-radio {
display: flex;
align-items: center;
label {
margin-top: 0.3rem;
}
}
}
.checkout-input span.formError, div.error.card-errors {