Take Tailwind out of the package, and its detection out of the guard
tests / feature (8.4) (push) Successful in 2m0s
tests / feature (8.5) (push) Successful in 2m0s
tests / browser (chrome, chromium) (push) Failing after 8m3s
tests / browser (firefox, firefox) (push) Failing after 12m58s
tests / browser (safari, webkit) (push) Failing after 13m8s
tests / feature (8.4) (push) Successful in 2m0s
tests / feature (8.5) (push) Successful in 2m0s
tests / browser (chrome, chromium) (push) Failing after 8m3s
tests / browser (firefox, firefox) (push) Failing after 12m58s
tests / browser (safari, webkit) (push) Failing after 13m8s
Tailwind left the stack in 2.0.0, but the package still carried about 330 mentions of it. What the guard's Tailwind detection protected — a class that compiles to nothing — is now protected by a check that does not care where a dead class came from. DesignGuard: about 500 lines of Tailwind tables, scales, palettes and "2.0.0 replacement" hints give way to one check — a class a view or PHP file writes that neither the application's stylesheets nor the package's own declare. It catches a utility of any framework, a typo and a class whose rules were deleted alike, so it also found two classes ReStride draws nothing with. A stylesheet has to be in reach for it: the `.css` files among the scanned paths, or what the `missingStylesheets()` entry imports. The class reader no longer mistakes an array index for a class list (`$block['base']`), and it reads the array a class helper is given, where it read nothing before. The package's own three Tailwind self-guards go with it. Only their one unique check stays, as a test of its own: every `matchMedia` width in resources/js is an M3 breakpoint. The pagination views are `material.blade.php` and `simple-material.blade.php`; only Laravel's and Livewire's default theme names ever made them `tailwind`. The provider sets `Paginator`'s default views and switches `livewire.pagination_theme` to `material` when it is still Livewire's own default, so no application can forget the config; a theme an application chose, and a component's own `$paginationTheme` or `paginationView()`, still win. The rest is prose: the layer-order guidance for an application that still builds Tailwind, the Tailwind wording in the README, the Boost guidelines and the development skill, and about 25 "this used to be a Tailwind utility" comments, along with every "plan step NN" pointer into a gitignored folder. The reset keeps its credit, and NOTICE now carries it too. Feature suite 1159 passed, Chrome browser suite 299 passed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
247c596c3a
commit
fb7007c976
@@ -8,10 +8,10 @@ namespace NoNameWeb\LivewireMaterial\Support;
|
||||
* nested panel), the medium and high contrast levels under `[data-contrast]` beside it, and — when
|
||||
* a caller gives one — every colour profile again under its own prefix (`[data-scheme='name']`).
|
||||
*
|
||||
* `SchemeCommand::handle()` writes this to the application's `material-scheme.css`; plan step 40
|
||||
* moved the shape itself here so `ErrorPage::fallbackStyles()` and the showcase's stylesheet can
|
||||
* draw the same scheme, from `Scheme::forStylesheet()` rather than a generated file, without a
|
||||
* second copy of the selectors to keep in step with the command's.
|
||||
* `SchemeCommand::handle()` writes this to the application's `material-scheme.css`; the shape
|
||||
* lives here so `ErrorPage::fallbackStyles()` and the showcase's stylesheet can draw the same
|
||||
* scheme, from `Scheme::forStylesheet()` rather than a generated file, without a second copy of
|
||||
* the selectors to keep in step with the command's.
|
||||
*/
|
||||
final class SchemeStylesheet
|
||||
{
|
||||
|
||||
@@ -4,19 +4,19 @@ namespace NoNameWeb\LivewireMaterial\Support;
|
||||
|
||||
/**
|
||||
* The package's stylesheet graph as `DesignGuard::missingStylesheets()` and `unusedStylesheets()`
|
||||
* (plan step 41) read it: which files a CSS entry reaches through its relative `@import`s. The
|
||||
* stylesheets the package serves on its own are not bundled here but prebuilt, by
|
||||
* `npm run build:stylesheets` (bin/stylesheets.mjs), into resources/dist/.
|
||||
* read it: which files a CSS entry reaches through its relative `@import`s. The stylesheets the
|
||||
* package serves on its own are not bundled here but prebuilt, by `npm run build:stylesheets`
|
||||
* (bin/stylesheets.mjs), into resources/dist/.
|
||||
*/
|
||||
final class Stylesheets
|
||||
{
|
||||
/**
|
||||
* Every file `$files` reaches, transitively, through their relative `@import`s — real paths,
|
||||
* `$files` themselves included — without concatenating anything. An application's CSS entry
|
||||
* may import what only a Vite build resolves — a package name (`tailwindcss`), a URL, an import
|
||||
* with a `layer()` or media condition — so this never throws: an import naming a URL, an
|
||||
* absolute path or a file that does not exist relative to its stylesheet is skipped, and a
|
||||
* conditional import still counts as reaching its file.
|
||||
* may import what only a Vite build resolves — a package name (`@fontsource/roboto`), a URL,
|
||||
* an import with a `layer()` or media condition — so this never throws: an import naming a
|
||||
* URL, an absolute path or a file that does not exist relative to its stylesheet is skipped,
|
||||
* and a conditional import still counts as reaching its file.
|
||||
*
|
||||
* @param list<string> $files
|
||||
* @return list<string>
|
||||
|
||||
Reference in New Issue
Block a user