Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9ad84f523 | ||
|
|
25906612f6 | ||
|
|
f94a813d79 |
@@ -299,8 +299,14 @@ html[data-wrap] .float { overflow-x: hidden; }
|
|||||||
.code-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
|
.code-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
|
||||||
.code {
|
.code {
|
||||||
font-family: var(--font-mono); font-size: var(--code-fs); line-height: var(--code-lh);
|
font-family: var(--font-mono); font-size: var(--code-fs); line-height: var(--code-lh);
|
||||||
padding: 14px 0; display: flex; overflow-x: auto;
|
padding: 14px 0; display: flex; overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
/* #261: horizontal scroll must live on the codebody, not the .code flex
|
||||||
|
container — a container-level scroll takes the gutter with it when the
|
||||||
|
user scrolls long lines. The gutter sits OUTSIDE the scroll container and
|
||||||
|
stays visible; the codebody shrinks to the remaining space and scrolls
|
||||||
|
(min-width: 0 lets it shrink below its content width inside the flex row). */
|
||||||
|
.code .codebody { flex: 1 1 auto; min-width: 0; overflow-x: auto; }
|
||||||
/* #167: the gutter must not drive the flex layout — its content width
|
/* #167: the gutter must not drive the flex layout — its content width
|
||||||
(row count × number width) shrinks the code column, which re-wraps lines,
|
(row count × number width) shrinks the code column, which re-wraps lines,
|
||||||
which grows the gutter: a feedback loop. Pin the gutter with a fixed
|
which grows the gutter: a feedback loop. Pin the gutter with a fixed
|
||||||
@@ -310,7 +316,7 @@ html[data-wrap] .float { overflow-x: hidden; }
|
|||||||
.code .gutter { flex-shrink: 0; }
|
.code .gutter { flex-shrink: 0; }
|
||||||
/* gutter/code share line metrics; the editor gutter keeps its own padding (#50) */
|
/* gutter/code share line metrics; the editor gutter keeps its own padding (#50) */
|
||||||
.code .gutter { padding-top: 0; padding-bottom: 0; }
|
.code .gutter { padding-top: 0; padding-bottom: 0; }
|
||||||
.codebody { padding: 0 18px; white-space: pre; }
|
.codebody { padding: 0 18px; white-space: pre; overflow-x: auto; }
|
||||||
/* #167: each logical line is its own block so offsetTop identifies its first visual row */
|
/* #167: each logical line is its own block so offsetTop identifies its first visual row */
|
||||||
.codeline { display: block; }
|
.codeline { display: block; }
|
||||||
/* #167 rev: gutter number spans must stack one per visual row (wrap on) */
|
/* #167 rev: gutter number spans must stack one per visual row (wrap on) */
|
||||||
|
|||||||
Reference in New Issue
Block a user