fix CSS nesting warnings and test type warnings

Replace BEM-style &--modifier nesting (unsupported in native CSS) with
&.class-modifier in shop/components.css and page_renderer.ex. Fix
Elixir 1.19 type warnings comparing lists with != [].

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-03-02 01:02:24 +00:00
parent fadcf57286
commit 96341613f4
5 changed files with 12 additions and 12 deletions

View File

@@ -819,7 +819,7 @@ defmodule BerrypodWeb.PageRenderer do
{Calendar.strftime(order.inserted_at, "%-d %B %Y")}
</p>
</div>
<span class={"order-status-badge order-status-badge--#{order.fulfilment_status}"}>
<span class={"order-status-badge order-status-badge-#{order.fulfilment_status}"}>
{format_order_status(order.fulfilment_status)}
</span>
</div>
@@ -856,7 +856,7 @@ defmodule BerrypodWeb.PageRenderer do
<.link navigate="/orders" class="order-detail-back">&larr; Back to orders</.link>
<h1 class="checkout-heading" style="margin-top: 1.5rem;">{assigns[:order].order_number}</h1>
<p class="checkout-meta">{Calendar.strftime(assigns[:order].inserted_at, "%-d %B %Y")}</p>
<span class={"order-status-badge order-status-badge--#{assigns[:order].fulfilment_status} order-status-badge--lg"}>
<span class={"order-status-badge order-status-badge-#{assigns[:order].fulfilment_status} order-status-badge-lg"}>
{format_order_status(assigns[:order].fulfilment_status)}
</span>
</div>