去掉系统已打开页面页签及无用关闭入口和样式;保留面包屑、来源路径与分页。左侧文字16px、图标20px,导航项最小44px。 验证:顶部页签移除与导航字号回归分别先红后绿,相关测试和类型检查通过;完整门禁与部署验收待执行。
This commit is contained in:
@@ -5,8 +5,16 @@ import { readFileSync } from 'node:fs'
|
||||
const styles = readFileSync(new URL('./styles.css', import.meta.url), 'utf8')
|
||||
|
||||
describe('mobile workspace navigation styles', () => {
|
||||
it('keeps only the active workspace tab and hamburger navigation on narrow screens', () => {
|
||||
expect(styles).toMatch(/@media \(max-width: 760px\)[\s\S]*?\.workspace-tab:not\(\.active\)\s*\{\s*display:\s*none;/)
|
||||
it('keeps the hamburger navigation and collapses only source context on narrow screens', () => {
|
||||
expect(styles).toMatch(/@media \(max-width: 760px\)[\s\S]*?\.workspace-context-tabs\s*\{\s*display:\s*none;/)
|
||||
})
|
||||
it('enlarges sidebar labels and icons with comfortable navigation targets', () => {
|
||||
const item = styles.match(/\.nav-item\s*\{([^}]+)\}/)![1]
|
||||
const icon = styles.match(/\.nav-icon\s*\{([^}]+)\}/)![1]
|
||||
expect(item).toMatch(/font-size:\s*16px;/)
|
||||
expect(item).toMatch(/min-height:\s*44px;/)
|
||||
expect(icon).toMatch(/font-size:\s*20px;/)
|
||||
expect(icon).toMatch(/width:\s*24px;/)
|
||||
expect(icon).toMatch(/height:\s*24px;/)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user