mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix vertical alignment using flex
- Firefox displayed the icon above the legend - Use `display: flex;` and `align-items: center;` to vertical align icon and text
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
"price-breakdown-placement" => "bottom",
|
||||
"price-breakdown-animation" => true}
|
||||
{{ variant.price_with_fees | localizeCurrency }}
|
||||
.variant-unit-price
|
||||
.unit-price.variant-unit-price
|
||||
%question-mark-with-tooltip{"question-mark-with-tooltip" => "_",
|
||||
"question-mark-with-tooltip-append-to-body" => "true",
|
||||
"question-mark-with-tooltip-placement" => "top",
|
||||
|
||||
@@ -67,8 +67,10 @@
|
||||
|
||||
.variant-unit-price {
|
||||
color: $grey-700;
|
||||
font-size: 0.9rem;
|
||||
font-size: 0.85rem;
|
||||
margin-top: 15px;
|
||||
position: relative;
|
||||
left: -1px;
|
||||
}
|
||||
|
||||
// Total price
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
|
||||
.unit-price {
|
||||
justify-content: flex-end;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
.unit-price {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.question-mark-icon {
|
||||
position: relative;
|
||||
top: 6px;
|
||||
right: 1px;
|
||||
background-image: image-url("question-mark-icon.svg");
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
// Reset button element css attributes
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 20px;
|
||||
min-width: 20px;
|
||||
height: 20px;
|
||||
background-color: transparent;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
%td
|
||||
.total-price.text-right {{ line_item.total_price | localizeCurrency }}
|
||||
- if feature? :unit_price, spree_current_user
|
||||
.flex.unit-price
|
||||
.unit-price
|
||||
%div{:style => "margin-right: 5px"}
|
||||
%question-mark-with-tooltip{"question-mark-with-tooltip" => "_",
|
||||
"question-mark-with-tooltip-append-to-body" => "true",
|
||||
|
||||
Reference in New Issue
Block a user