Fix desktop blur from false tablet layout.
Stop classifying short desktop viewports as tablets so densify fonts do not apply. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -77,13 +77,19 @@
|
||||
return window.matchMedia("(max-width: 720px)").matches;
|
||||
}
|
||||
|
||||
/** 平板 CSS 视口(如 2560×1600 @2x ≈ 1280×800),或高度偏矮的大屏 */
|
||||
/**
|
||||
* 平板 CSS 视口(如 2560×1600@2x≈1280×800, 竖屏≈800×1280)。
|
||||
* 禁止「仅按高度」判断:1080p 电脑开任务栏/浏览器栏时 innerHeight 常 ≤920,
|
||||
* 会误加 hub-tablet,字号被压到 ~10px,看起来发糊。
|
||||
*/
|
||||
function isTabletLayout() {
|
||||
if (isMobileLayout()) return false;
|
||||
const w = window.innerWidth || 0;
|
||||
const h = window.innerHeight || 0;
|
||||
if (w >= 721 && w <= 1599) return true;
|
||||
if (w >= 721 && h > 0 && h <= 920) return true;
|
||||
// 横屏平板:中等宽度 + 偏矮
|
||||
if (w >= 721 && w <= 1366 && h > 0 && h <= 900) return true;
|
||||
// 竖屏平板:偏窄 + 偏高
|
||||
if (w >= 721 && w <= 920 && h >= 900) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user