-
+
-
+
@@ -82,8 +82,7 @@
-
-
+
@@ -92,7 +91,7 @@
- The menu button collapses and expands the rail. The choice is remembered and applied before the next page paints — every collapsible rail follows it, <x-app-shell>'s from lg too.
+ The menu button collapses and expands the rail, and the FAB morphs into an extended FAB with it. The choice is remembered and applied before the next page paints — every collapsible rail follows it, <x-app-shell>'s from expanded (840px) too.
BLADE,
@@ -104,7 +103,7 @@
<x-navigation-bar> and <x-navigation-bar-item>, <x-navigation-rail>, <x-navigation-rail-item> and <x-navigation-rail-section>,
- and <x-app-shell>, which puts them together: a bar below sm, a collapsed rail that opens as a modal to lg, a collapsible rail from there.
+ and <x-app-shell>, which puts them together on M3's window size classes: a bar below medium (600px), a collapsed rail that opens as a modal through medium, a standard rail from expanded (840px) and an expanded one from large (1200px).
Open the app shell and change the window's width.
diff --git a/resources/views/showcase/shell.blade.php b/resources/views/showcase/shell.blade.php
index 9f92612e..09190a86 100644
--- a/resources/views/showcase/shell.blade.php
+++ b/resources/views/showcase/shell.blade.php
@@ -45,8 +45,7 @@
-
-
+
diff --git a/tests/Feature/Components/NavigationRailTest.php b/tests/Feature/Components/NavigationRailTest.php
index 4f0c54e3..17df10d3 100644
--- a/tests/Feature/Components/NavigationRailTest.php
+++ b/tests/Feature/Components/NavigationRailTest.php
@@ -51,6 +51,22 @@ it('keeps the header and footer out of the scrolling destinations', function ()
->toMatch('/data-navigation-rail-header.*Brand.*FAB.*data-navigation-rail-destinations.*Inbox.*data-navigation-rail-footer.*Account/s');
});
+it('takes M3\'s optional divider and turns the container fill off', function () {
+ expect((string) $this->blade(''))
+ ->toContain('data-divider')
+ ->toContain('data-fill="false"')
+ ->and((string) $this->blade(''))
+ ->not->toContain('data-divider')
+ ->not->toContain('data-fill');
+
+ expect(file_get_contents(__DIR__.'/../../../resources/css/components/navigation.css'))
+ // Neither reaches a rail open over a scrim, which is a surface over the page (N-22).
+ ->toContain('[data-navigation-rail][data-divider]:not([data-open]) > [data-navigation-rail-panel] {')
+ ->toContain("[data-navigation-rail][data-fill='false']:not([data-open]) > [data-navigation-rail-panel] {")
+ // A collapsible rail is held to 96px where M3 asks for a navigation bar instead (N-24).
+ ->toMatch("/\\[data-navigation-rail='collapsible'\\] \\{\\s+width: 6rem;/");
+});
+
it('flattens a FAB nested in the rail header to elevation 0', function () {
$html = (string) $this->blade(<<<'BLADE'
@@ -58,12 +74,14 @@ it('flattens a FAB nested in the rail header to elevation 0', function () {
BLADE);
- // The hook the unlayered rule in navigation.css needs (N-03).
+ // The hook the unlayered rules in navigation.css need (N-03).
expect($html)->toContain('data-fab');
expect(file_get_contents(__DIR__.'/../../../resources/css/components/navigation.css'))
->toContain('[data-navigation-rail-header] [data-fab],')
- ->toContain('[data-navigation-rail-header] [data-fab]:hover {');
+ ->toContain('[data-navigation-rail-header] [data-fab]:hover {')
+ // One FAB whose label springs shut, not two swapped by display (N-23).
+ ->toContain('[data-navigation-rail-header] [data-fab] > span {');
});
it('draws a destination in both shapes, with its count on the icon and at the end', function () {