diff --git a/frontend/components/Cart.vue b/frontend/components/Cart.vue index 999f982..166fe15 100644 --- a/frontend/components/Cart.vue +++ b/frontend/components/Cart.vue @@ -6,8 +6,7 @@

Handlekurv

- - +
@@ -38,6 +37,36 @@
Product
+ + + + + + + + + + + + + + + + + + + + + + + +
Product + + {{ product.name }} +
Price38.99 NOK
Quantity2
Delsum77.99 NOK
+ +
+

Totalt i handlekurven

@@ -131,6 +160,20 @@ table.cart-inventory { } } + @include tablet { + table-layout: auto; + + th:first-of-type { + width: 40%; + } + th:not(:first-of-type) { + width: 15%; + } + th:last-of-type { + width: 20%; + } + } + .name-and-image { display: flex; align-items: center; @@ -165,6 +208,45 @@ table.cart-inventory { } } +table.cart-inventory--mobile { + table-layout: auto; + + td { + text-align: right; + } + + th::after { + content: ':'; + } + + tbody:nth-of-type(even) { + background-color: var(--color-background-highlight); + } + + tbody:last-of-type tr:last-of-type { + th, td { + border: 0px solid; + } + } + + .name-and-image { + img { + display: none; + width: 150px; + } + } + + .remove-row { + td { + padding: 0.4rem; + } + + th::after { + content: ''; + } + } +} + .checkout-summary table { tr:last-of-type { th, td { @@ -172,6 +254,10 @@ table.cart-inventory { } } + th { + width: 35%; + } + .frakt p { font-size: 0.9em; } @@ -185,6 +271,10 @@ table { font-size: 1.2em; + @include mobile { + font-size: 1.1em; + } + tr th, tr td { border-bottom: 2px solid rgba(255,255,255,.1); } @@ -194,7 +284,6 @@ table { } th { - width: 35%; text-align: left; vertical-align: top; }