| 1 |
// ======= Options |
| 2 |
|
| 3 |
// By default, hide `o_add_wishlist` buttons when inside a product |
| 4 |
// entry. Show them when `o_wsale_products_opt_has_wishlist` is applied. |
| 5 |
:where(.oe_product_cart) .o_add_wishlist { |
| 6 |
display: var(--o-wsale-wishlist-btn-display, none); |
| 7 |
} |
| 8 |
|
| 9 |
.o_wsale_products_opt_has_wishlist { |
| 10 |
--o-wsale-wishlist-btn-display: inline-flex; |
| 11 |
|
| 12 |
.o_add_wishlist { |
| 13 |
&:hover .fa-heart-o:before, &[disabled] .fa:before { |
| 14 |
content: "\f004"; |
| 15 |
color: var(--addWishlist-color-active); |
| 16 |
} |
| 17 |
|
| 18 |
&[disabled] .fa { |
| 19 |
animation: bounceIn 1s; |
| 20 |
} |
| 21 |
} |
| 22 |
} |
| 23 |
|
| 24 |
.o_wsale_products_opt_wishlist_fixed.o_wsale_products_opt_wishlist_fixed_onhover { |
| 25 |
.oe_product_cart:where(:not(:hover):not(:focus-visible):not(:focus-within)) { |
| 26 |
.o_add_wishlist:where(:not([disabled])) { |
| 27 |
opacity: 0; |
| 28 |
} |
| 29 |
} |
| 30 |
} |
| 31 |
|
| 32 |
.o_wsale_products_opt_actions_subtle, .o_wsale_products_opt_actions_promote { |
| 33 |
.o_wsale_product_btn .o_add_wishlist { |
| 34 |
// Hardcoded because cause `$danger` may differ from the desired "red" |
| 35 |
$_wish_red: #ff3d3a; |
| 36 |
--addWishlist-color-active: #{$_wish_red}; |
| 37 |
} |
| 38 |
} |
| 39 |
|
| 40 |
.o_wsale_products_opt_wishlist_fixed { |
| 41 |
&:where(:not(.o_wsale_products_opt_design_showcase)) { |
| 42 |
--o-wsale-card-info-position: none; |
| 43 |
} |
| 44 |
|
| 45 |
&:where(.o_wsale_products_opt_has_wishlist) { |
| 46 |
--o-wsale-wishlist-btn-display: flex; |
| 47 |
} |
| 48 |
|
| 49 |
.o_wsale_product_btn .o_add_wishlist { |
| 50 |
--btn-bg: transparent; |
| 51 |
--btn-border-width: 0; |
| 52 |
--btn-hover-bg: transparent; |
| 53 |
--btn-active-bg: transparent; |
| 54 |
--btn-disabled-opacity: 1; |
| 55 |
--btn-disabled-bg: transparent; |
| 56 |
|
| 57 |
--o-wsale-card-btn-subtle-blur: 0px; |
| 58 |
|
| 59 |
--o-wsale-wishlist-btn-offset-top-default: calc(var(--o-wsale-card-border-radius, 0px) * 0.1); |
| 60 |
--o-wsale-wishlist-btn-offset-end-default: calc(var(--o-wsale-card-border-radius, 0px) * 0.2); |
| 61 |
|
| 62 |
@include o-position-absolute( |
| 63 |
var(--o-wsale-card-offset-top, var(--o-wsale-wishlist-btn-offset-top-default)), |
| 64 |
var(--o-wsale-card-offset-x, var(--o-wsale-wishlist-btn-offset-end-default)) |
| 65 |
); |
| 66 |
} |
| 67 |
} |
| 68 |
|