chore(admin-ui): refine list-card table borders and rounding
This commit is contained in:
@@ -152,10 +152,17 @@
|
|||||||
.list-card-body{
|
.list-card-body{
|
||||||
border-top:1px solid var(--adm-border-color, #e5e7eb);
|
border-top:1px solid var(--adm-border-color, #e5e7eb);
|
||||||
padding:0;
|
padding:0;
|
||||||
|
overflow:hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-card-table{
|
.list-card-table{
|
||||||
margin:0;
|
margin:0;
|
||||||
|
border-collapse:separate;
|
||||||
|
border-spacing:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-card-table tbody tr:last-child td{
|
||||||
|
border-bottom:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-card-table th,
|
.list-card-table th,
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminComponentsCssListCardTableShouldHaveCleanBordersTest 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_components_css_list_card_table_should_have_clean_borders(): void
|
||||||
|
{
|
||||||
|
$this->loginAsPlatformAdmin();
|
||||||
|
|
||||||
|
$css = file_get_contents(public_path('css/admin-components.css'));
|
||||||
|
$this->assertIsString($css);
|
||||||
|
|
||||||
|
// List Card 表格应通过 overflow+separate 模式实现“边界干净”,避免最后一行多一条底线。
|
||||||
|
$this->assertStringContainsString('.list-card-body{', $css);
|
||||||
|
$this->assertStringContainsString('overflow:hidden', $css);
|
||||||
|
|
||||||
|
$this->assertStringContainsString('.list-card-table{', $css);
|
||||||
|
$this->assertStringContainsString('border-collapse:separate', $css);
|
||||||
|
$this->assertStringContainsString('border-spacing:0', $css);
|
||||||
|
|
||||||
|
$this->assertStringContainsString('.list-card-table tbody tr:last-child td{', $css);
|
||||||
|
$this->assertStringContainsString('border-bottom:none', $css);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user