Put the mail card on M3's corner scale and its header at title-lg
Plan step 19, containment.md C-27 and C-28. `.inner-body` was 24px, a value not on M3's 0/4/8/12/16/20/28/32/48 scale; it is 28px, the extra-large corner of the dialog and bottom-sheet surface it stands in for. `.header a` is title-large at weight 400, which its own section comment and the `h2` under it already said. 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
a237d33426
commit
657fa526fa
@@ -118,7 +118,7 @@ it('inlines the application\'s scheme onto the mail', function () {
|
||||
->toContain('border-top: 16px solid #123456')
|
||||
->toContain('color: #fefefe')
|
||||
->toContain('border-radius: 9999px')
|
||||
->and(inlineStyle($html, 'inner-body'))->toContain('background-color: #fdfdfd')
|
||||
->and(inlineStyle($html, 'inner-body'))->toContain('background-color: #fdfdfd')->toContain('border-radius: 28px')
|
||||
->and(inlineStyle($html, 'wrapper'))->toContain('background-color: #eeeeee')
|
||||
->and(inlineStyle($html, 'panel-content'))->toContain('background-color: #eeeeee')
|
||||
->and($html)
|
||||
@@ -190,6 +190,19 @@ it('styles every button colour Laravel and M3 name', function () {
|
||||
expect($css)->not->toContain('@media');
|
||||
});
|
||||
|
||||
it('keeps every corner and weight on M3\'s scales', function () {
|
||||
$css = view('livewire-material::mail.theme')->render();
|
||||
|
||||
preg_match_all('/border-radius: (\d+)px/', $css, $corners);
|
||||
|
||||
// M3's shape scale, plus the `full` corner a button draws as a large pixel value.
|
||||
expect(array_unique($corners[1]))->each->toBeIn(['0', '4', '8', '12', '16', '20', '28', '32', '48', '9999'])
|
||||
->and($css)->toContain(<<<'CSS'
|
||||
.header a {
|
||||
CSS)
|
||||
->toMatch('/\.header a \{[^}]*font-weight: 400/');
|
||||
});
|
||||
|
||||
it('leaves the application\'s mail components alone unless asked', function () {
|
||||
expect(config('mail.markdown.paths'))->not->toContain(LivewireMaterialServiceProvider::mailComponentPath());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user