Stop loading Tailwind on the showcase page
Plan step 38 (last batch): every showcase view is now rewritten without Tailwind, so the showcase's layout keeps only the JavaScript entries of the application's configured Vite list (Livewire, Alpine) before its own bundle link, instead of the whole array — its own CSS already comes solely from ShowcaseAssetController's bundle (Stylesheets::bundle() of all.css, showcase.css and the scheme), and linking the application's build too meant the package's own CSS (all.css) loaded twice on every showcase page (once through the Workbench's package.css entry, once through the showcase's own bundle), besides pulling in Tailwind's CSS for nothing. ErrorPage:: assets() keeps passing the whole configured list: the error pages have no bundle of their own to fall back on, and step 40 is where their fallback is redesigned. The config's own comment says so. The frame's temporary visually-hidden <h2> rule goes too — it existed only because the first batch could not reach into the still-Tailwind sections/*.blade.php partials it @include's; every section now carries its own real `class="md-type-headline-md"` heading, so the structural rule that quietly hid all of them is dead weight. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
ab2fcdb0d3
commit
42009f3b0c
@@ -38,13 +38,13 @@
|
||||
|
||||
<x-livewire-material::theme-script />
|
||||
|
||||
{{-- Kept only for the section views (resources/views/showcase/sections/*), still Tailwind
|
||||
until the next batches of step 38, and for the Livewire/Alpine runtime; its CSS entry
|
||||
goes with them. It opens the document's first @layer statement (Workbench package.css's
|
||||
header explains the trick), which the link below must follow, not precede — first would
|
||||
re-anchor `material` ahead of Tailwind's own layers and let its preflight's `padding: 0`
|
||||
beat the search view's padding-top. --}}
|
||||
@vite(config('livewire-material.showcase.vite'))
|
||||
{{-- The application's own entries, JavaScript only (Livewire, Alpine): no showcase view
|
||||
needs anything Tailwind builds any more, and linking its CSS here would open the
|
||||
document's first @layer statement (Workbench package.css's header explains the trick)
|
||||
ahead of the showcase's own bundle below, re-anchoring `material` before Tailwind's
|
||||
own layers instead of after. config('livewire-material.showcase.vite')'s own comment
|
||||
says why ErrorPage::assets() still passes the whole array. --}}
|
||||
@vite(array_filter(config('livewire-material.showcase.vite'), fn (string $entry): bool => ! str_ends_with($entry, '.css')))
|
||||
@livewireStyles
|
||||
|
||||
{{-- The showcase's own chrome: does not depend on the build above. --}}
|
||||
|
||||
Reference in New Issue
Block a user