Improve control char rendering and escape button styling (#37094)

Follow-up to #37078.

- Use Unicode Control Pictures](U+2400-U+2421) to render C0 control characters
- Make it work in diff view too
- Replace escape warning emoji with SVG
- Align escape warning button with code lines

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
silverwindandwxiaoguang authored and GitHub committed 2026-04-06 11:07:33 +00:00
1 parent e47c6135dd
commit 423cdd4d94
37 files changed
+1561 -1794

No files matched your search

+13 -4
View File
@@ -15,11 +15,20 @@
transform: scale(1.1);
}
.lines-escape .toggle-escape-button {
margin: -1px 2px 0;
}
.lines-escape .toggle-escape-button::before {
visibility: visible;
content: "⚠️";
font-family: var(--fonts-emoji);
color: var(--color-red);
content: "";
display: inline-flex;
width: 14px;
height: 14px;
background-color: var(--color-yellow); /* TODO: maybe it needs a new kind of color, there is no suitable "warning" color in the current palette */
mask-image: var(--octicon-alert-fill);
-webkit-mask-image: var(--octicon-alert-fill);
mask-size: contain;
-webkit-mask-size: contain;
}
.repository .diff-file-box .code-diff td.lines-escape {