Name the replacement for a Tailwind palette colour in the design guard
Plan step 41 review: "colour the theme does not declare `text-red-500`" was the one family (i) finding without a 2.0.0 hint; it now says the utility compiles to nothing and points at md-ink-* or var(--md-sys-color-*). The foundation-only fixture view also carries an <x-dynamic-component> and an <x-slot:title>, which the stylesheet check must neither report nor trip on. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
This commit is contained in:
co-authored by
Claude Opus 5
parent
2d75091b82
commit
bbd0192790
@@ -387,7 +387,7 @@ class DesignGuard
|
||||
|
||||
if (preg_match_all($this->colourPattern(), $text, $matches)) {
|
||||
foreach ($matches[0] as $class) {
|
||||
$violations[] = "{$where}:{$line} colour the theme does not declare `{$class}`";
|
||||
$violations[] = "{$where}:{$line} Tailwind palette colour `{$class}` compiles to nothing — M3 paints with roles: an `md-ink-*` class, or `var(--md-sys-color-*)` in your own CSS";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ it('finds what compiles to nothing', function () {
|
||||
$violations = DesignGuard::scan([realpath(GUARD_FIXTURES.'/app'), realpath(GUARD_FIXTURES.'/views')])->violations();
|
||||
|
||||
expect(fixtureRelative($violations))->toBe([
|
||||
'app/Status.php:14 colour the theme does not declare `text-red-500`',
|
||||
'app/Status.php:14 Tailwind palette colour `text-red-500` compiles to nothing — M3 paints with roles: an `md-ink-*` class, or `var(--md-sys-color-*)` in your own CSS',
|
||||
'views/page.blade.php:2 Tailwind spacing utility `p-4` compiles to nothing — use `padding="space200"` (16px) on `<x-surface>`, or `var(--md-sys-measurement-space200)` in your own CSS',
|
||||
'views/page.blade.php:6 Tailwind colour utility `text-tertiary` compiles to nothing — use `var(--md-sys-color-tertiary)` in your own CSS',
|
||||
'views/page.blade.php:6 1.x utility `focus-ring` compiles to nothing — use `md-focus-ring` (interaction.css)',
|
||||
@@ -30,7 +30,7 @@ it('finds what compiles to nothing', function () {
|
||||
'views/page.blade.php:3 unknown Material Symbol `o-home`',
|
||||
'views/page.blade.php:4 unknown Material Symbol `not_a_symbol`',
|
||||
'views/page.blade.php:8 Blade directive `@class` inside a component tag, where it does not compile',
|
||||
'views/page.blade.php:5 colour the theme does not declare `text-red-600`',
|
||||
'views/page.blade.php:5 Tailwind palette colour `text-red-600` compiles to nothing — M3 paints with roles: an `md-ink-*` class, or `var(--md-sys-color-*)` in your own CSS',
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
<div>Nothing package-specific here.</div>
|
||||
<x-dynamic-component :component="$name" />
|
||||
<x-slot:title>Title</x-slot:title>
|
||||
|
||||
Reference in New Issue
Block a user