From c53c94174d00b1ea416022f3c6a92fb1017d9e4e Mon Sep 17 00:00:00 2001 From: Andreas Reinhold / reini Date: Tue, 15 Sep 2026 05:32:02 +0200 Subject: [PATCH] Rewrite the showcase's Containment section without Tailwind Plan step 38 (last batch): every example moves onto the layout components, the md-* text classes and tokens. Wrapper divs that only sized or grouped a demo (grid/list widths, the divider-and-collapse stack, the dragged-card scope) become // with an inline style where a specific px width still matters; a video thumbnail's Tailwind gradient utility becomes an inline background/color pair since each list-item's own colours differ. The standard side sheet demo keeps M3's row-then-column breakpoint through , with a data-md-showcase-side-sheet-demo hook that restores the row's own stretch alignment once it collapses to a column (an explicit align="start", needed for the row layout, would otherwise leave it shrink-wrapped). Every id, data-md-* selector and visible string the Chromium ContainmentTest reads (#containment, its dialog/sheet/card queries) is unchanged; no demo content removed. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9 --- resources/css/showcase.css | 21 ++++ .../showcase/sections/containment.blade.php | 104 +++++++++--------- 2 files changed, 72 insertions(+), 53 deletions(-) diff --git a/resources/css/showcase.css b/resources/css/showcase.css index 7bbaae38..6342ee32 100644 --- a/resources/css/showcase.css +++ b/resources/css/showcase.css @@ -32,6 +32,16 @@ * attribute, so a few widths below are plain `.showcase-*` classes instead of `data-md-showcase-*` * hooks — the same "caller's class" mechanism any application would reach for, deliberately not * named `md-*` since they are not part of the fixed set text.css declares. + * + * Batch 4 (the last: containment, carousel, bars, navigation, pages) adds the standard side + * sheet demo's own breakpoint (a `` beats its own `stack-below` alignment back to `stretch` + * once collapsed to a column, which an `align` the row mode needs would otherwise leave + * shrink-wrapped), a bordered app-bar/toolbar frame (plain, `visible` for the search bar whose + * docked suggestions must not clip, `rounded` for the large-screen docked toolbar), a narrow + * scrollable-tabs box, and the navigation bar and rail demo frames (`bar`, `bar-wide` inside its + * own horizontal-scroll wrapper, `rail`, `rail-wide`) with their filler "page" and content panes. + * Every per-item carousel colour stays the caller's own inline `style`, the same mechanism as the + * colour swatch above. */ @layer material.reset, material.tokens, material.base, material.layout, material.components, material.text, material.visibility; @@ -446,6 +456,17 @@ width: 100%; overflow-x: auto; } + + /* Containment: the standard side sheet demo is a row from `expanded` (840px), M3's own + condition for a co-planar sheet, and a column below it — ``'s own `stack-below` + stacks it there, but leaves the `align="start"` the row layout needs (so the sheet does not + stretch to the text column's height) in place, which would otherwise shrink-wrap both + columns instead of stacking them full width. */ + @media (width < 840px) { + [data-md-showcase-side-sheet-demo] { + align-items: stretch; + } + } } /* A handful of call sites (, , ) forward only `class` and diff --git a/resources/views/showcase/sections/containment.blade.php b/resources/views/showcase/sections/containment.blade.php index ac1f5fc8..9b7834e7 100644 --- a/resources/views/showcase/sections/containment.blade.php +++ b/resources/views/showcase/sections/containment.blade.php @@ -1,7 +1,7 @@ @php $examples = [ 'Cards' => <<<'BLADE' -
+ The default card. @@ -15,36 +15,36 @@ Quiet, on the surface itself. -
+
BLADE, 'A card that opens from anywhere on it' => <<<'BLADE' - - holiday-photos.zip -

248 MB · expires in 3 days

+ + holiday-photos.zip +

248 MB · expires in 3 days

BLADE, 'A directly actionable card: the card is the tab stop' => <<<'BLADE' - - contract.pdf -

1.2 MB · downloaded twice

+ + contract.pdf +

1.2 MB · downloaded twice

BLADE, 'A card being dragged' => <<<'BLADE' -
+ Elevation 4 and the 16% state layer, for as long as the application says the card is being carried. -
+ BLADE, 'Lists' => <<<'BLADE' -
+ @@ -59,35 +59,35 @@ -
+ BLADE, 'A list to choose from' => <<<'BLADE' - + BLADE, 'A list with leading video' => <<<'BLADE' - + -
- +
+
-
- +
+
BLADE, 'Dividers and collapse' => <<<'BLADE' -
+ Until the expiry you chose, from one hour to thirty days. @@ -95,33 +95,33 @@ No. They can only download what you shared. -
LeftRight
-
+ LeftRight + BLADE, 'A divider with a subheader' => <<<'BLADE' -
+
- +
BLADE, 'Collapse bound to a property' => <<<'BLADE' -
-
+ + - advanced: -
+ advanced: + Bound with x-model here. In a Livewire view, wire:model="advanced" binds a boolean property the same way, and the page arrives with it open or closed as the property is. -
+ BLADE, 'Dialogs' => <<<'BLADE'
@@ -157,7 +157,7 @@
-
+

A share link opens the files you chose, and only those. Adding a file to the folder later does not add it to a link you have already sent; make a new link for it.

Anyone who has the link can open it until it expires. Forwarding the link forwards that access, so send it to the people who need it and to nobody else.

A password, when you set one, is asked for every time the link is opened. Send it separately from the link, by another channel, so one intercepted message is not enough.

@@ -168,7 +168,7 @@

Previews are generated for images, PDFs and plain text. Other types show their name, size and an icon.

Deleting a file you shared removes it from every link that holds it. People who open such a link see the files that are left.

These terms apply to every link you create from now on. Links you created before keep the terms they were made under.

-
+ @@ -188,25 +188,23 @@
BLADE, 'A standard side sheet: co-planar from expanded, modal below' => <<<'BLADE' -
-
-
- -

- From expanded (840px) the sheet beside this text is co-planar: no scrim, no focus trap, flat on the surface, divided from this column by a rule. Narrow the window and the same sheet becomes the modal one. -

-
+ + + +

+ From expanded (840px) the sheet beside this text is co-planar: no scrim, no focus trap, flat on the surface, divided from this column by a rule. Narrow the window and the same sheet becomes the modal one. +

+
- - - - - - - - -
-
+ + + + + + + + + BLADE, 'Sheets' => <<<'BLADE'
@@ -235,7 +233,7 @@
-

Press the drag handle, or focus it and press Enter, to move to the next height; from the last it closes. Dragging it settles on the nearest.

+

Press the drag handle, or focus it and press Enter, to move to the next height; from the last it closes. Dragging it settles on the nearest.

@@ -247,10 +245,10 @@ ]; @endphp -
-

Containment

+ +

Containment

-

+

<x-card>, <x-list> and <x-list-item>, <x-divider>, <x-collapse>, <x-modal>, <x-drawer> and <x-bottom-sheet>.

@@ -258,4 +256,4 @@ @foreach ($examples as $title => $code) @endforeach -
+