From 7b7e7279f5e0f6518388a447f72114643c95d018 Mon Sep 17 00:00:00 2001 From: Andreas Reinhold / reini Date: Tue, 15 Sep 2026 05:32:31 +0200 Subject: [PATCH] Rewrite the showcase's App bars and tabs section without Tailwind Plan step 38 (last batch): the app-bar/toolbar row becomes / , each bordered demo box a data-md-showcase-bar-frame hook (`visible` for the search bar, whose docked suggestions must not clip; `rounded` for the large-screen docked toolbar, which only gains its edge and padding from `expanded`, 840px), and the search bar's own avatar reuses the existing data-md-showcase-avatar hook. The scrollable-tabs demo's forced-narrow box is data-md-showcase-tabs-narrow, and the "Open the scaffold" link uses the shared md-link/md-ink-primary classes in place of the old Tailwind-era link/text-primary utilities. Every #bars id and visible label/tooltip the Chromium BarsTest (against its own probes) and the search index rely on is unchanged. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9 --- resources/css/showcase.css | 32 +++++++++++ .../views/showcase/sections/bars.blade.php | 56 +++++++++---------- 2 files changed, 60 insertions(+), 28 deletions(-) diff --git a/resources/css/showcase.css b/resources/css/showcase.css index 0dcfd750..7d378eca 100644 --- a/resources/css/showcase.css +++ b/resources/css/showcase.css @@ -476,6 +476,38 @@ width: 100%; height: 100%; } + + /* Bars: a bordered frame around one app-bar or docked-toolbar demo, matching the rounding a + real scaffold would clip its bar to. `visible` lets the search bar's docked suggestions + overflow it instead of clipping; `rounded` is the large-screen docked toolbar, which has no + edge of its own and only gains its padding from `expanded` (840px), M3's own condition for + the rounded (rather than square) docked toolbar. */ + [data-md-showcase-bar-frame] { + width: 100%; + overflow: hidden; + border-radius: var(--md-sys-shape-corner-lg); + border: 1px solid var(--md-sys-color-outline-variant); + } + + [data-md-showcase-bar-frame='visible'] { + overflow: visible; + } + + [data-md-showcase-bar-frame='rounded'] { + border: 0; + background-color: var(--md-sys-color-surface); + } + + @media (width >= 840px) { + [data-md-showcase-bar-frame='rounded'] { + padding: var(--md-sys-measurement-space200); + } + } + + /* Bars: the scrollable-tabs demo needs a width narrow enough to force its own scroll. */ + [data-md-showcase-tabs-narrow] { + max-width: 384px; + } } /* A handful of call sites (, , ) forward only `class` and diff --git a/resources/views/showcase/sections/bars.blade.php b/resources/views/showcase/sections/bars.blade.php index 5ead9279..f83528bd 100644 --- a/resources/views/showcase/sections/bars.blade.php +++ b/resources/views/showcase/sections/bars.blade.php @@ -1,8 +1,8 @@ @php $examples = [ 'Top app bars' => <<<'BLADE' -
-
+ +
@@ -13,7 +13,7 @@
{{-- Resize the window: two icon buttons below 600px, four from there, the rest in "More options". --}} -
+
-
+
-
+
-
- +
+ - AR + AR
-
+ BLADE, 'Toolbars' => <<<'BLADE' -
+ @@ -78,7 +78,7 @@ -
+
@@ -87,7 +87,7 @@
-
+
@@ -98,7 +98,7 @@
{{-- M3's docked toolbar on a large screen: rounded from 840px, its groups of controls divided. Narrower, it is the square docked bar. --}} -
+
@@ -109,10 +109,10 @@
-
+ BLADE, 'Primary tabs' => <<<'BLADE' -
+ Three files, 248 MB. Anna, Ben and Chiara. @@ -124,25 +124,25 @@ Only photos. Only videos. -
+ BLADE, 'Secondary and scrollable tabs' => <<<'BLADE' -
+ An overview of the account. Passwords and two-factor sign-in. Plan and invoices. -
+
January's shares.
-
+
BLADE, 'Section navigation, account menu and theme toggles' => <<<'BLADE' -
+ -
+ @@ -161,20 +161,20 @@ -
-
+ + BLADE, ]; @endphp -
-

App bars, toolbars and tabs

+ +

App bars, toolbars and tabs

-

+

<x-app-bar>, <x-toolbar>, <x-tabs>, <x-tab>, <x-section-nav>, <x-account-menu> and <x-theme-toggle>.

@foreach ($examples as $title => $code) @endforeach -
+