From a4b368386d6e76a93173f6a56e7f7422badd6a5c Mon Sep 17 00:00:00 2001 From: Andreas Reinhold / reini Date: Tue, 15 Sep 2026 04:17:02 +0200 Subject: [PATCH] Rewrite the showcase's Elevation section without Tailwind MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plan step 38: the shadow-level grid moves onto and ; each tile is a data-md-showcase-elevation-tile keyed on data-md-elevation, drawing var(--md-sys-elevation-1..5) — the same tokens the label now names instead of the retired shadow-elevation-* utility. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9 --- resources/css/showcase.css | 30 +++++++++++++++++++ .../showcase/sections/elevation.blade.php | 28 +++++++++-------- 2 files changed, 45 insertions(+), 13 deletions(-) diff --git a/resources/css/showcase.css b/resources/css/showcase.css index c1bcca79..7b2a9ca5 100644 --- a/resources/css/showcase.css +++ b/resources/css/showcase.css @@ -210,4 +210,34 @@ [data-md-showcase-shape-swatch][data-md-corner='full'] { border-radius: var(--md-sys-shape-corner-full); } + + /* Elevation: a tile at one shadow level, on the surface-container-high M3 pairs a shadow with. */ + [data-md-showcase-elevation-tile] { + display: flex; + align-items: center; + justify-content: center; + height: 96px; + border-radius: var(--md-sys-shape-corner-md); + background-color: var(--md-sys-color-surface-container-high); + } + + [data-md-showcase-elevation-tile][data-md-elevation='1'] { + box-shadow: var(--md-sys-elevation-1); + } + + [data-md-showcase-elevation-tile][data-md-elevation='2'] { + box-shadow: var(--md-sys-elevation-2); + } + + [data-md-showcase-elevation-tile][data-md-elevation='3'] { + box-shadow: var(--md-sys-elevation-3); + } + + [data-md-showcase-elevation-tile][data-md-elevation='4'] { + box-shadow: var(--md-sys-elevation-4); + } + + [data-md-showcase-elevation-tile][data-md-elevation='5'] { + box-shadow: var(--md-sys-elevation-5); + } } diff --git a/resources/views/showcase/sections/elevation.blade.php b/resources/views/showcase/sections/elevation.blade.php index bcde41f5..78f82a8e 100644 --- a/resources/views/showcase/sections/elevation.blade.php +++ b/resources/views/showcase/sections/elevation.blade.php @@ -1,19 +1,21 @@ -
-

Elevation

+ +

Elevation

-

- Five shadow levels as shadow-elevation-*, for what floats over content. +

+ Five shadow levels as --md-sys-elevation-*, for what floats over content.

-

+

Panels separate by tone first: the surface-container steps are a hierarchy of emphasis, not of height. Shadows are for what floats or lifts — 1 for elevated cards, buttons and modal sheets; 2 for menus, the navigation bar and a scrolled app bar; 3 for the FAB, dialogs, pickers and search; one level more on hover; nothing rests above 3. Fewer shadows carry more meaning.

-
- @foreach (['shadow-elevation-1', 'shadow-elevation-2', 'shadow-elevation-3', 'shadow-elevation-4', 'shadow-elevation-5'] as $shadow) -
- {{ $shadow }} -
- @endforeach -
-
+ + + @foreach ([1, 2, 3, 4, 5] as $level) +
+ --md-sys-elevation-{{ $level }} +
+ @endforeach +
+
+