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 -
+