diff --git a/resources/css/tailwind.css b/resources/css/tailwind.css index 8d88dea8..5052a092 100644 --- a/resources/css/tailwind.css +++ b/resources/css/tailwind.css @@ -16,3 +16,50 @@ @import './tokens/theme.css'; @import './tokens/utilities.css'; + +/* + * `rail-collapsed:` — Tailwind's, for the one class left that needs it: + * scaffold.blade.php's `data-app-shell-actions` row (`rail-collapsed:flex-col`), stacking the + * footer's icon buttons once the rail they sit in narrows. The definition used to live in + * navigation.css; that file is gone (plan step 36, navigation group), so this is what is left of + * it — updated to the `data-md-*` hooks navigation-rail.css now renders, otherwise identical to + * every branch that file's own header still documents. Goes with the scaffold's own rewrite, + * whenever `data-app-shell-actions` stops being a Tailwind class list. + */ +@custom-variant rail-collapsed { + &:where([data-md-navigation-rail='collapsed'], [data-md-navigation-rail='collapsed'] *) { + @slot; + } + + &:where([data-rail='collapsed'] [data-md-navigation-rail='collapsible']:not([data-md-open]), [data-rail='collapsed'] [data-md-navigation-rail='collapsible']:not([data-md-open]) *) { + @slot; + } + + &:where([data-md-navigation-rail='modal']:not([data-md-open]), [data-md-navigation-rail='modal']:not([data-md-open]) *) { + @slot; + } + + @media (width < 600px) { + &:where([data-md-navigation-rail='collapsible']:not([data-md-open]), [data-md-navigation-rail='collapsible']:not([data-md-open]) *) { + @slot; + } + } + + @media (width < 840px) { + &:where([data-md-navigation-rail='adaptive']:not([data-md-open]), [data-md-navigation-rail='adaptive']:not([data-md-open]) *) { + @slot; + } + } + + @media (840px <= width < 1200px) { + &:where(:is([data-rail='collapsed'], [data-rail-auto]) [data-md-navigation-rail='adaptive']:not([data-md-open]), :is([data-rail='collapsed'], [data-rail-auto]) [data-md-navigation-rail='adaptive']:not([data-md-open]) *) { + @slot; + } + } + + @media (width >= 1200px) { + &:where([data-rail='collapsed'] [data-md-navigation-rail='adaptive']:not([data-md-open]), [data-rail='collapsed'] [data-md-navigation-rail='adaptive']:not([data-md-open]) *) { + @slot; + } + } +} diff --git a/resources/views/components/theme-script.blade.php b/resources/views/components/theme-script.blade.php index 4aa35998..f41cf9aa 100644 --- a/resources/views/components/theme-script.blade.php +++ b/resources/views/components/theme-script.blade.php @@ -28,7 +28,7 @@ The rail rides along for the theme's reason: is `expanded` or `collapsed` (`livewire-material.rail.storage_key`, falling back to `rail.default`), and a collapsible - rail's width is CSS keyed on it (the `rail-collapsed:` variant). Set any later, a collapsed + rail's width is CSS keyed on it directly (resources/css/components/navigation-rail.css). Set any later, a collapsed rail would paint wide and snap shut on every load. `$store.rail` (resources/js/navigation.js) changes it. rides with it and says nothing was stored — the value is only `rail.default`, not a choice — so ``'s adaptive rail can start collapsed in the