Files
zhimingge/components/layout/site-width.ts
T
dekun 234ce18756 Widen layout on tablet landscape while keeping 1080p desktop width.
Use max-w-6xl between 1024-1919px for iPad landscape, reset to max-w-4xl at 1920px for unchanged desktop.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 08:54:01 +08:00

19 lines
989 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 响应式内容宽度(类名须完整书写,供 Tailwind 扫描)
* - 手机 / 平板竖屏(<1024):随屏宽,上限约 896px
* - 平板横屏(10241919):约 1152px,比 1080p 桌面更宽
* - 1080p 桌面(1920):约 896px(不变)
* - 1921px+ / 2560px+ / 3440px+:带鱼屏阶梯加宽
*/
export const SITE_PAD = "px-4 sm:px-6 lg:px-8";
export const SITE_WIDTH =
`w-full max-w-4xl ${SITE_PAD} min-[1024px]:max-w-6xl min-[1920px]:max-w-4xl min-[1921px]:max-w-6xl min-[2560px]:max-w-7xl min-[3440px]:max-w-[1440px]`;
export const SITE_WIDTH_NARROW =
`w-full max-w-3xl ${SITE_PAD} min-[1024px]:max-w-5xl min-[1920px]:max-w-3xl min-[1921px]:max-w-4xl min-[2560px]:max-w-5xl min-[3440px]:max-w-6xl`;
/** 页眉 / 页脚内层,与主内容同宽 */
export const SITE_WIDTH_INNER =
`mx-auto w-full max-w-4xl ${SITE_PAD} min-[1024px]:max-w-6xl min-[1920px]:max-w-4xl min-[1921px]:max-w-6xl min-[2560px]:max-w-7xl min-[3440px]:max-w-[1440px]`;