chore(admin-ui): tokenise topnav hover highlight with primary tint
This commit is contained in:
@@ -54,7 +54,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.toast-close:hover{
|
.toast-close:hover{
|
||||||
background:rgba(22, 119, 255, .08);
|
background:var(--adm-primary-tint-08, rgba(22, 119, 255, .08));
|
||||||
color:var(--adm-text, #0f172a);
|
color:var(--adm-text, #0f172a);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -498,7 +498,7 @@
|
|||||||
|
|
||||||
.topnav-brand:hover{
|
.topnav-brand:hover{
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
background:rgba(22, 119, 255, .08);
|
background:var(--adm-primary-tint-08, rgba(22, 119, 255, .08));
|
||||||
}
|
}
|
||||||
|
|
||||||
.topnav-menu{
|
.topnav-menu{
|
||||||
@@ -522,7 +522,7 @@
|
|||||||
.topnav-link:hover,
|
.topnav-link:hover,
|
||||||
.topnav-summary:hover{
|
.topnav-summary:hover{
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
background:rgba(22, 119, 255, .08);
|
background:var(--adm-primary-tint-08, rgba(22, 119, 255, .08));
|
||||||
color:var(--adm-text, #0f172a);
|
color:var(--adm-text, #0f172a);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -568,7 +568,7 @@
|
|||||||
|
|
||||||
.topnav-sub:hover{
|
.topnav-sub:hover{
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
background:rgba(22, 119, 255, .08);
|
background:var(--adm-primary-tint-08, rgba(22, 119, 255, .08));
|
||||||
}
|
}
|
||||||
|
|
||||||
.topnav-actions{
|
.topnav-actions{
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminComponentsCssTopnavHoverShouldUsePrimaryTintTokenTest 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_topnav_hover_should_use_primary_tint_token(): void
|
||||||
|
{
|
||||||
|
$this->loginAsPlatformAdmin();
|
||||||
|
|
||||||
|
$css = file_get_contents(public_path('css/admin-components.css'));
|
||||||
|
$this->assertIsString($css);
|
||||||
|
|
||||||
|
// 顶部导航 hover 高亮必须走 primary tint token,避免散落 rgba 硬编码。
|
||||||
|
$this->assertStringContainsString('.topnav-link:hover', $css);
|
||||||
|
$this->assertStringContainsString('background:var(--adm-primary-tint-08', $css);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user