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
+19
-9
@@ -1,6 +1,6 @@
|
||||
# Upgrading
|
||||
|
||||
## From 2.1.0 to 2.1.1
|
||||
## From 2.1.0 to 2.2.0
|
||||
|
||||
- **Run `php artisan view:clear` after upgrading.** The components are no longer registered under a
|
||||
view namespace named after a hash of their folder, which only views compiled before 1.0.1 still
|
||||
@@ -28,14 +28,6 @@
|
||||
under that path is no longer checked for literal values, and its classes no longer exempt the
|
||||
same names in the application's other views. A filter an application wrote around such a
|
||||
finding can go.
|
||||
- **`DesignGuard`** reports a colour utility on a colour the application's own Tailwind theme
|
||||
named (`bg-brand`, `text-sport-run`, `from-brand`, `border-l-zone-4`, `bg-brand/8`) in a class
|
||||
list, with `var(--…)` of the application's own as its replacement, unless the application's
|
||||
CSS declares the class. None of them has compiled since 2.0.0, and they were the leftovers its
|
||||
count never showed. Tailwind's other utilities on the same prefixes are named by their own
|
||||
family now too: `border-collapse`, `border-spacing-*`, `from-10%`, `via-none`, `fill-none`,
|
||||
`stroke-*`, `text-shadow-*`, `text-inherit`, and Tailwind 4.2's `mauve`, `olive`, `mist` and
|
||||
`taupe` palettes. A test that expects no findings may fail on them.
|
||||
- **`DesignGuard`** counts a row written by hand. `data-md-list-row` on an `<li>`, a `<div>`, a
|
||||
`<tr>` or `<x-row>` takes its hover, focus and press state layer and its selected fill from
|
||||
`components/list-item.css`, but `missingStylesheets()` and `unusedStylesheets()` read only tags
|
||||
@@ -121,6 +113,24 @@
|
||||
itself from outside; a Tab onto the control, including the one that wraps round to it, and focus
|
||||
moved within the layer still show them. An `autofocus` an application put on another control to
|
||||
keep the focus off the close button can go.
|
||||
- **`DesignGuard`** reports any class a view or PHP file writes that no stylesheet declares —
|
||||
not the package's `md-*`, not the application's own CSS — instead of naming Tailwind's
|
||||
utilities, variants and theme colours with their 2.0.0 replacement. It now catches a dead class
|
||||
from any source: a typo, a utility of a framework that isn't in the stack, a class whose rule
|
||||
was deleted — not only Tailwind's — but a class assembled in a PHP string (`'text-'.$tone`) is
|
||||
still not seen. A test that asserted on the old Tailwind-shaped message needs the new one
|
||||
instead.
|
||||
- **The pagination views are `material.blade.php` and `simple-material.blade.php`**, no longer named
|
||||
after Tailwind. The provider sets `Paginator::defaultView('pagination::material')` and
|
||||
`defaultSimpleView('pagination::simple-material')`, and switches `livewire.pagination_theme` to
|
||||
`material` whenever it still reads as Livewire's own default (`tailwind`, including when the key
|
||||
is missing), so an application can no longer forget the config and silently render Livewire's own
|
||||
Tailwind view. An application that already chose another theme, or a component with its own
|
||||
`$paginationTheme` property or `paginationView()` method, is untouched — either still wins.
|
||||
- **`foundation.css` no longer explains how to order layers beside Tailwind.** No consumer builds
|
||||
Tailwind any more, so the paragraph about opening both entries with
|
||||
`@layer properties, theme, base, material, components, utilities;` is gone; the layer statement
|
||||
and the order it declares are otherwise unchanged.
|
||||
|
||||
## From 2.0.0 to 2.1.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user