Draw the snackbar's action and close buttons from the classes

Plan step 36 ("Interaction is the shared classes", the user, 2026-09-14).
The action and the close button hand-rolled md-state-layer, md-focus-ring
and md-touch-target, and toast.css's own header said so; both now render
the classes and keep only their own size and colour.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
This commit is contained in:
Andreas Reinhold / reini
2026-09-14 18:10:16 +02:00
co-authored by Claude Opus 5
parent 5a9211acd4
commit 480387a64e
3 changed files with 9 additions and 57 deletions
+4 -4
View File
@@ -25,12 +25,12 @@ it('draws no state icon, and reaches 48px from its 40px controls', function () {
->and($html)->not->toContain('text-inverse-success')
->toContain('data-md-toast-action')
->toContain('data-md-toast-dismiss')
// 48px, from the foundation's md-touch-target class, not a copy of its own.
->toMatch('/class="md-state-layer md-focus-ring md-touch-target" data-md-toast-action/')
->toMatch('/class="md-state-layer md-focus-ring md-touch-target" data-md-toast-dismiss/')
->and($css->declarations(':is([data-md-toast-action], [data-md-toast-dismiss])'))
->toHaveKey('border-radius', 'var(--md-sys-shape-corner-full)')
->and($css->declarations(':is([data-md-toast-action], [data-md-toast-dismiss])::after'))->toMatchArray([
'min-width' => 'var(--md-sys-measurement-space600)',
'min-height' => 'var(--md-sys-measurement-space600)',
])
->and($css->has(':is([data-md-toast-action], [data-md-toast-dismiss])::after'))->toBeFalse()
->and($css->declarations('[data-md-toast-dismiss]'))->toMatchArray([
'width' => 'var(--md-sys-measurement-space500)',
'height' => 'var(--md-sys-measurement-space500)',