admin ui: align card border fallback with light theme tokens
This commit is contained in:
@@ -57,7 +57,7 @@ a:hover{text-decoration:underline;}
|
||||
.top{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:20px;}
|
||||
.page-title{margin:0;}
|
||||
|
||||
.card{border:1px solid var(--adm-border-color, #334155);border-radius:var(--adm-radius, 14px);padding:16px;background:var(--adm-bg-container, transparent);box-shadow:var(--adm-shadow-sm, none);}
|
||||
.card{border:1px solid var(--adm-border-color, #e5e7eb);border-radius:var(--adm-radius, 14px);padding:16px;background:var(--adm-bg-container, transparent);box-shadow:var(--adm-shadow-sm, none);}
|
||||
.card + .card{margin-top:20px;}
|
||||
.card-spaced{margin-bottom:20px;}
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminBaseCssCardBorderShouldUseThemeBorderColorTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
protected function loginAsPlatformAdmin(): void
|
||||
{
|
||||
$this->seed();
|
||||
|
||||
$this->post('/admin/login', [
|
||||
'email' => 'platform.admin@demo.local',
|
||||
'password' => 'Platform@123456',
|
||||
])->assertRedirect('/admin');
|
||||
}
|
||||
|
||||
public function test_admin_base_css_card_border_should_use_theme_border_color(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$css = file_get_contents(public_path('css/admin-base.css'));
|
||||
$this->assertIsString($css);
|
||||
|
||||
// 卡片边框必须使用浅色主题边框变量,避免残留暗色边框 fallback(#334155)。
|
||||
$this->assertStringContainsString('.card{border:1px solid var(--adm-border-color, #e5e7eb)', $css);
|
||||
$this->assertStringNotContainsString('var(--adm-border-color, #334155)', $css);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user