Grow the snackbar's text from a zero basis again

Plan step 36. The rewrite drew Tailwind's `flex-1` (flex: 1 1 0%) as
`flex: 1 1 auto`. In a wrapping row that measures the text at its full
line length, so a long title pushed the action onto a line of its own
from 600px, where the two used to share one. The header also gave a
reason for drawing the buttons' state layer by hand that does not hold
(the layer is currentColor either way); it now says why: the view writes
no class list, as button.css.

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 17:06:28 +02:00
co-authored by Claude Opus 5
parent d706eef01b
commit 204c2d2b24
2 changed files with 9 additions and 5 deletions
+3
View File
@@ -47,6 +47,9 @@ it('grows to M3\'s two-line height, and wraps the action below on a compact wind
->toContain('x-bind:data-md-toast-wrap="current.description && current.action ? \'\' : null"')
->and($css->declarations('[data-md-toast-snackbar]'))->toHaveKey('min-height', 'var(--md-sys-measurement-space600)')
->and($css->declarations('[data-md-toast-snackbar][data-md-two-line]'))->toBe(['min-height' => '68px'])
// The text grows from a zero basis, so a long title shrinks beside the action rather than
// wrapping it onto a line of its own where there is room for both.
->and($css->declarations('[data-md-toast-content]'))->toHaveKey('flex', '1')
->and($css->declarations('[data-md-toast-content][data-md-toast-wrap]', ['@media (width < 600px)']))->toBe(['flex-basis' => '100%'])
->and($css->declarations('[data-md-toast-action]'))->toHaveKey('height', 'var(--md-sys-measurement-space500)');
});