admin-components: normalize tool-group css formatting (maintainable)
This commit is contained in:
@@ -54,8 +54,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 平台订单:工具区(两列分组卡片化,避免表单散落) */
|
/* 平台订单:工具区(两列分组卡片化,避免表单散落) */
|
||||||
.tool-grid{align-items:start;}
|
.tool-grid{
|
||||||
.tool-group{width:100%;}
|
align-items:start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-group{
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
.tool-group-title{
|
.tool-group-title{
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
color:#94a3b8;
|
color:#94a3b8;
|
||||||
@@ -64,7 +70,10 @@
|
|||||||
font-weight:700;
|
font-weight:700;
|
||||||
margin:0 0 10px;
|
margin:0 0 10px;
|
||||||
}
|
}
|
||||||
.tool-group-subtitle{margin:0 0 6px;}
|
|
||||||
|
.tool-group-subtitle{
|
||||||
|
margin:0 0 6px;
|
||||||
|
}
|
||||||
|
|
||||||
/* 平台订单列表:避免列太多导致内容挤压成“竖排/断字” */
|
/* 平台订单列表:避免列太多导致内容挤压成“竖排/断字” */
|
||||||
.table-wrap{
|
.table-wrap{
|
||||||
|
|||||||
34
tests/Feature/AdminComponentsCssToolGroupFormattingTest.php
Normal file
34
tests/Feature/AdminComponentsCssToolGroupFormattingTest.php
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminComponentsCssToolGroupFormattingTest 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_contains_tool_group_blocks_with_braced_formatting(): void
|
||||||
|
{
|
||||||
|
$this->loginAsPlatformAdmin();
|
||||||
|
|
||||||
|
$css = file_get_contents(public_path('css/admin-components.css'));
|
||||||
|
$this->assertIsString($css);
|
||||||
|
|
||||||
|
// 只做轻量“存在性/格式”断言:避免回到单行写法(不利于长期维护)
|
||||||
|
$this->assertStringContainsString(".tool-grid{\n", $css);
|
||||||
|
$this->assertStringContainsString(".tool-group{\n", $css);
|
||||||
|
$this->assertStringContainsString(".tool-group-subtitle{\n", $css);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user