修复游戏创作页头按钮样式
恢复 Tailwind Preflight 后的页头操作按钮边框与间距 补充页头按钮样式与禁用态回归测试
This commit is contained in:
@@ -561,6 +561,7 @@ textarea {
|
||||
}
|
||||
|
||||
.launcher-page-actions button,
|
||||
.launcher-page .launcher-project-list-actions button,
|
||||
.launcher-project-table article > button,
|
||||
.launcher-empty-projects button {
|
||||
height: 32px;
|
||||
@@ -572,6 +573,11 @@ textarea {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.launcher-page .launcher-project-list-actions button:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.launcher-page-actions button:last-child {
|
||||
border-color: #111827;
|
||||
background: #111827;
|
||||
|
||||
@@ -13642,6 +13642,23 @@ describe('AI 游戏创作 App 界面边界', () => {
|
||||
expect(styles).toMatch(/\.message\s*\{[^}]*overflow-wrap:\s*anywhere/s);
|
||||
});
|
||||
|
||||
it('keeps launcher page header actions styled after Tailwind preflight', () => {
|
||||
const styles = readFileSync(
|
||||
resolve(process.cwd(), 'apps/ai-game-creator-shell/src/styles.css'),
|
||||
'utf8',
|
||||
);
|
||||
const headerActionRule = styles.match(
|
||||
/\.launcher-page \.launcher-project-list-actions button,[^{]*\{([^}]*)\}/s,
|
||||
);
|
||||
|
||||
expect(headerActionRule?.[1]).toContain('padding: 0 12px;');
|
||||
expect(headerActionRule?.[1]).toContain('border: 1px solid #d8dde5;');
|
||||
expect(headerActionRule?.[1]).toContain('background: #fff;');
|
||||
expect(styles).toMatch(
|
||||
/\.launcher-page \.launcher-project-list-actions button:disabled\s*\{[^}]*cursor:\s*not-allowed;[^}]*opacity:\s*0\.55;/s,
|
||||
);
|
||||
});
|
||||
|
||||
it('shows developer panels only in dev mode', () => {
|
||||
renderAppAt('/?dev');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user