diff --git a/resources/css/checkout.css b/resources/css/checkout.css index 7cf136e..13642a3 100644 --- a/resources/css/checkout.css +++ b/resources/css/checkout.css @@ -58,6 +58,14 @@ --bbk-radius: 8px; --bbk-radius-sm: 4px; --bbk-shadow: 0 12px 32px rgba(0, 0, 0, 0.16); + + /* Icons are used as CSS masks filled with currentColor, so they follow + the element's colour (hover, theme). Swap one by pointing the variable + at any single-colour SVG — the shape is what counts, not its fill: + + :root { --bbk-icon-remove: url("/images/icons/bin.svg"); } + */ + --bbk-icon-remove: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6M10 11v6M14 11v6'/%3E%3C/svg%3E"); } .bbk-cart[hidden] { display: none; } @@ -279,7 +287,6 @@ a.bbk-cart-item-title:hover { text-decoration: underline; } negative margins so the glyph lines up with the title's first line instead of pushing the row taller. */ .bbk-cart-item-remove { - font-size: 1.75rem; width: 2.5rem; height: 2.5rem; margin: -0.5rem -0.5rem 0 0; @@ -291,6 +298,14 @@ a.bbk-cart-item-title:hover { text-decoration: underline; } .bbk-cart-item-remove:hover { background: var(--bbk-color-bg-muted); } +.bbk-cart-item-remove-icon { + width: 1.25rem; + height: 1.25rem; + background-color: currentColor; + -webkit-mask: var(--bbk-icon-remove) center / contain no-repeat; + mask: var(--bbk-icon-remove) center / contain no-repeat; +} + .bbk-cart-qty { display: inline-flex; align-items: center; diff --git a/resources/views/checkout/partials/cart-line.blade.php b/resources/views/checkout/partials/cart-line.blade.php index aa9a281..888941d 100644 --- a/resources/views/checkout/partials/cart-line.blade.php +++ b/resources/views/checkout/partials/cart-line.blade.php @@ -59,7 +59,7 @@ class="bbk-cart-item-remove" aria-label="{{ __('checkout.cart.remove') }}" aria-describedby="bbk-cart-item-title-{{ $line->id }}" - > + >{{-- Icon drawn by CSS (--bbk-icon-remove) so themes can swap it. --}}