From 44a29a8ea27a580f0ecacab9d95b87b24657a8e1 Mon Sep 17 00:00:00 2001 From: Andreas Reinhold / reini Date: Tue, 15 Sep 2026 04:18:37 +0200 Subject: [PATCH] Rewrite the showcase's Icons section without Tailwind MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plan step 38: the filter row is now real components — and two s — instead of a bespoke bordered label and accent-coloured native inputs; the result grid is of / tiles. The fetched symbol's mask stays the view's own x-bind:style (its shorthand depends on the fetched name), but the size it toggles between 24 and 20px is now the data-md-showcase-icon-size attribute a script sets, never a class, drawn by data-md-showcase-icon-mask in showcase.css. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9 --- resources/css/showcase.css | 15 +++++ .../views/showcase/sections/icons.blade.php | 62 ++++++++----------- 2 files changed, 42 insertions(+), 35 deletions(-) diff --git a/resources/css/showcase.css b/resources/css/showcase.css index d7f0bd47..37d4e7b1 100644 --- a/resources/css/showcase.css +++ b/resources/css/showcase.css @@ -261,4 +261,19 @@ border-radius: var(--md-sys-shape-corner-full); background-color: var(--md-sys-color-tertiary); } + + /* Icons: one search result's mask (its `mask` shorthand is the fetched symbol, so it stays the + view's own x-bind:style), 24px by default and 20px once optical size 20 is on — the state a + script toggles as data-md-showcase-icon-size, never a class. */ + [data-md-showcase-icon-mask] { + display: block; + width: 24px; + height: 24px; + background-color: currentColor; + } + + [data-md-showcase-icon-mask][data-md-showcase-icon-size='20'] { + width: 20px; + height: 20px; + } } diff --git a/resources/views/showcase/sections/icons.blade.php b/resources/views/showcase/sections/icons.blade.php index bba669a6..6d94aae3 100644 --- a/resources/views/showcase/sections/icons.blade.php +++ b/resources/views/showcase/sections/icons.blade.php @@ -1,6 +1,7 @@ -
-

Icons

+

Icons

-

+

Every Material Symbol (Rounded, 400, grade 0) as <x-icon name="…" />, outlined or filled, drawn from the optical size 24 cut or — for an icon 20px or smaller, where 24's strokes would look thin — - the 20 cut: <x-icon name="…" optical="20" class="size-5" />. + the 20 cut: <x-icon name="…" optical="20" />.

-

+

filled means active or selected; optical="20" when an icon is drawn at 20px or less; one weight per group. An icon takes the size and colour of the text beside it. An icon-only control carries an accessible name; a decorative icon is hidden.

-
- + + + + + - - - -
- -
    + -
-
+ +