余白:桌面端文章去卡片 + 阅读页宽屏三栏外扩
去卡片(桌面 + 手机统一) - .paper 去掉底色 / 1px 边框 / 20px 圆角 / box-shadow,正文直接落在页面上; 右上角那团强调色渐晕(::before)是卡片的角饰,一并删掉,position/overflow 随之不再需要 - 48px 横向内边距保留:它不是装饰,是「中列 776 - 96 = 680 = --measure」这半个算式, 删了正文要么超出行宽、要么在列里右空 96px;手机上归零(那 48px 在 390 屏上是浪费) 宽屏三栏外扩(≥1200px) - 1100 的画布上限在 1456 的屏上两侧各空 171px,同时中列只有 650px、正文 554px ——根本没到 --measure 的 680。所以「文章太窄」和「留白太大」是同一个原因 - 上限提到 1340,列改 180 / minmax(0,776) / 220 + space-between: 中列 776 = 680(正文) + 48×2(.paper 内边距),正文吃满 --measure 且列内不剩空; space-between 让时间线左缘 / 目录右缘正好落在 28px 内边距上 - 顶栏在阅读页同步放宽(YohakuTop 按 /post/* 加 .top-in.wide),否则品牌和主题键 会比左右栏缩进一百多像素。首页仍 1100 —— 信息流卡片跟着放到 1340 只会把封面拉成条 实测(offsetWidth,.paper 有入场动画的 scale,getBoundingClientRect 会带上它) - 1456:画布 1100 -> 1340,两侧空白 171 -> 51,中列 650 -> 776,正文 554 -> 678 - 1920:两侧空白 403 -> 283;1200 及以下不变;首页 top-in 仍 1100、卡片 1044 - 平铺后桌面 .paper:bg 透明 / border 0 / radius 0 / shadow none / ::before none, 正文 680;手机正文 335(与上一版一致) 修一处自己引入的编译错误:顶栏那个 class 起初命名 wide,与组件里已有的 wide(721px matchMedia)撞名 —— Identifier 'wide' has already been declared, :3000 直接 500、页面全白。已改名 mqWide。 公网 138.2.17.73:8080 产物 md5 与磁盘一致;npm run build 无警告。
This commit is contained in:
@@ -7,6 +7,17 @@ html[data-ui='vivid'] .article-layout {max-width:1100px;margin:0 auto;padding:36
|
||||
html[data-ui='vivid'] .side-l, html[data-ui='vivid'] .side-r {display:none}
|
||||
html[data-ui='vivid'] .progress-pct {display:none}
|
||||
}
|
||||
/* 宽屏:三栏往外扩。1100 的上限在 1456 的屏上两侧各空 171px,而且中间那列只有
|
||||
650px(正文 554px,根本没到 --measure 的 680),所以「文章太窄」和「留白太大」
|
||||
是同一个原因。这里把上限提到 1340,中列固定在 776 = 680(正文) + 48×2(.paper 内边距),
|
||||
正文正好吃满 --measure 而不留内空;侧栏 180/220 把多出来的宽度吸收掉,
|
||||
space-between 让时间线左缘 / 目录右缘正好落在 28px 内边距上(和顶栏对齐)。
|
||||
顶栏在阅读页同步放宽到 1340,见 chrome.css 的 .top-in.wide。 */
|
||||
@media (min-width:1200px) {
|
||||
html[data-ui='vivid'] .article-layout {max-width:1340px;
|
||||
grid-template-columns:180px minmax(0,776px) 220px;
|
||||
justify-content:space-between;}
|
||||
}
|
||||
html[data-ui='vivid'] .side-l {position:sticky;top:80px;padding-top:8px}
|
||||
html[data-ui='vivid'] .tl {position:relative;padding-left:14px}
|
||||
html[data-ui='vivid'] .tl::before {content:"";position:absolute;left:3px;top:6px;bottom:6px;width:1.5px;
|
||||
@@ -20,22 +31,16 @@ html[data-ui='vivid'] .tl-item.now::before {background:var(--accent);
|
||||
box-shadow:0 0 0 4px var(--accent-soft);}
|
||||
html[data-ui='vivid'] .tl-item b {display:block;color:var(--soft);font-weight:700;font-size:12px}
|
||||
html[data-ui='vivid'] .tl-item.now b {color:var(--accent)}
|
||||
html[data-ui='vivid'] .paper {background:var(--card);
|
||||
border:1px solid var(--line);
|
||||
border-radius:var(--radius-lg);
|
||||
box-shadow:var(--shadow-lg);
|
||||
padding:44px 48px 52px;
|
||||
position:relative;
|
||||
overflow:hidden;
|
||||
/* 纸张不再是卡片:去掉底色 / 边框 / 圆角 / 阴影,正文直接落在页面上(手机和桌面一致)。
|
||||
48px 横向内边距留着 —— 现在它只是留白,但它决定了正文列在中列里的位置:
|
||||
776(中列) - 96 = 680 = --measure,正好吃满,卡片里和列里都不会剩空。
|
||||
右上角那团强调色渐晕是卡片的角饰,卡片没了也一并去掉。 */
|
||||
html[data-ui='vivid'] .paper {padding:44px 48px 52px;
|
||||
animation:paperIn .7s var(--spring) both;}
|
||||
@keyframes paperIn {
|
||||
from {opacity:0;transform:translateY(24px) scale(.985)}
|
||||
to {opacity:1;transform:none}
|
||||
}
|
||||
html[data-ui='vivid'] .paper::before {content:"";position:absolute;top:0;right:0;
|
||||
width:120px;height:120px;
|
||||
background:radial-gradient(circle at 100% 0,var(--accent-soft),transparent 70%);
|
||||
pointer-events:none;}
|
||||
html[data-ui='vivid'] .paper .meta {display:flex;gap:12px;align-items:center;flex-wrap:wrap;
|
||||
font-size:12.5px;color:var(--muted);font-weight:600;margin-bottom:18px;}
|
||||
html[data-ui='vivid'] .paper h1 {margin:0 0 20px;font-size:clamp(28px,4vw,40px);font-weight:800;
|
||||
|
||||
Reference in New Issue
Block a user