From ec904822065916f47bff0769402a05369c8731fd Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 2 Apr 2026 21:55:38 +0200 Subject: [PATCH] Fix broken-code-point positioning and comment Add position: relative to .broken-code-point[data-escaped] to establish a containing block for the absolutely positioned .char child. Anchor the child with left: 0. Replace AI-referencing comment with description of actual purpose. Co-Authored-By: Claude (Opus 4.6) --- web_src/css/modules/charescape.css | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web_src/css/modules/charescape.css b/web_src/css/modules/charescape.css index 0bbd0dd573f..b72d7bdf452 100644 --- a/web_src/css/modules/charescape.css +++ b/web_src/css/modules/charescape.css @@ -11,14 +11,20 @@ Only show the real-char: background: var(--color-text-light-1); } +.broken-code-point[data-escaped] { + position: relative; +} + .broken-code-point[data-escaped]::before { visibility: visible; content: attr(data-escaped); color: var(--color-red); } + .broken-code-point[data-escaped] .char { - /* make it copyable by selecting the text (AI suggestion, no other solution) */ + /* keep the original character selectable/copyable while showing the escaped label via ::before */ position: absolute; + left: 0; opacity: 0; pointer-events: none; }