feat: 今天环境条布局优化——大屏单行六格、移动端补齐分隔线、统一字号层级
- >=1360px 单行六格(44px 高,倒数日收尾),条高 91->61,大屏不再两行空荡 - 721-1359 保持 2x3 网格,主值字号 13->14、日历 15->16/700,内容垂直居中 - 移动端补油价/股市行与倒数日行缺失的 border-top(行间分隔线断层) - 移动端锁定 13/15px 防大屏字号渗入;e2e 几何断言同步 61px 新值
This commit is contained in:
@@ -75,7 +75,7 @@ test('Today plain-list layout matches the approved responsive geometry', async (
|
||||
})).toEqual({
|
||||
media720: width <= 720,
|
||||
contentWidth: width >= 1440 ? 1080 : width > 930 ? Math.min(1080, width - 324) : width === 721 ? 630 : width - 56,
|
||||
environmentHeight: width >= 721 ? 91 : width === 375 ? 154 : 158,
|
||||
environmentHeight: width >= 1360 ? 61 : width >= 721 ? 91 : width === 375 ? 154 : 158,
|
||||
})
|
||||
await expect(page.locator('.today-heading')).toHaveCount(1)
|
||||
await expect(page.locator('.today-inline-add')).toHaveCount(0)
|
||||
@@ -279,11 +279,11 @@ test('Today plain-list layout matches the approved responsive geometry', async (
|
||||
expect(metrics.styles.fabShadow).toContain('8px 18px')
|
||||
expect(metrics.styles.fabIconWidth).toBeCloseTo(30, 0)
|
||||
if (width >= 721) {
|
||||
expect(metrics.uniqueRows).toHaveLength(2)
|
||||
expect(metrics.uniqueRows).toHaveLength(width >= 1360 ? 1 : 2)
|
||||
expect(metrics.content.width).toBeCloseTo(width >= 1440 ? 1080 : width > 930 ? Math.min(1080, width - 324) : 630, 0)
|
||||
expect(Math.max(...metrics.itemWidths) - Math.min(...metrics.itemWidths)).toBeLessThanOrEqual(1)
|
||||
expect(Math.max(...metrics.itemHeights) - Math.min(...metrics.itemHeights)).toBeLessThanOrEqual(1)
|
||||
expect(Math.round(metrics.environment.height)).toBe(91)
|
||||
expect(Math.round(metrics.environment.height)).toBe(width >= 1360 ? 61 : 91)
|
||||
expect(metrics.styles.titleFontSize).toBe('34px')
|
||||
} else {
|
||||
expect(metrics.uniqueRows).toHaveLength(4)
|
||||
|
||||
Reference in New Issue
Block a user