diff --git a/src/Testing/DesignGuard.php b/src/Testing/DesignGuard.php index 089508c4..2532a745 100644 --- a/src/Testing/DesignGuard.php +++ b/src/Testing/DesignGuard.php @@ -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"; } } diff --git a/tests/Feature/DesignGuardTest.php b/tests/Feature/DesignGuardTest.php index 0062554b..084c7bed 100644 --- a/tests/Feature/DesignGuardTest.php +++ b/tests/Feature/DesignGuardTest.php @@ -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 ``, 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', ]); }); diff --git a/tests/Fixtures/design-guard/stylesheets/views/plain.blade.php b/tests/Fixtures/design-guard/stylesheets/views/plain.blade.php index 62001bb4..da3f9bc7 100644 --- a/tests/Fixtures/design-guard/stylesheets/views/plain.blade.php +++ b/tests/Fixtures/design-guard/stylesheets/views/plain.blade.php @@ -1 +1,3 @@
Nothing package-specific here.
+ +Title