fix(markdown): 修复窄表格在 table-wrap 内边框被裁切
overflow-x:auto 会强制 overflow-y 也建滚动盒,裁切 table 向外 spread 的 1px box-shadow 描边,导致不需要滚动的窄表格右下角边框断裂。 给 .table-wrap 加 padding:1px 为描边预留空间,负 margin:-1px 抵消外部尺寸 偏移,使 wrap 不撑大父容器、左上仍贴齐正文边缘。
This commit is contained in:
parent
485d4b1cc4
commit
07d737af0f
@ -584,8 +584,13 @@
|
||||
}
|
||||
|
||||
/* table-wrap:渲染器给宽表格套的滚动容器,移动端窄屏可横向滚动。
|
||||
(见 src/api/markdown.rs::wrap_tables)。min-width 让窄表仍撑满、宽表撑开触发滚动。 */
|
||||
(见 src/api/markdown.rs::wrap_tables)。min-width 让窄表仍撑满、宽表撑开触发滚动。
|
||||
padding 为 table 的 1px box-shadow 描边预留空间:overflow 容器(overflow-x:auto 会
|
||||
强制 overflow-y 也建滚动盒)会裁切向外 spread 的阴影,导致右下边框断裂。
|
||||
负 margin 抵消 padding 的外部尺寸,使 wrap 不撑大父容器、左上仍贴齐正文边缘。 */
|
||||
.md-content .table-wrap {
|
||||
margin: -1px;
|
||||
padding: 1px;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user