From 49ac6653f23e5efd8a8ab972a5f8346d3e540f67 Mon Sep 17 00:00:00 2001 From: Sa-Te <106857731+Sa-Te@users.noreply.github.com> Date: Wed, 21 Jan 2026 20:41:50 +0000 Subject: [PATCH] =?UTF-8?q?Fix(Playground):=20Prevent=20code=20block=20lin?= =?UTF-8?q?e=20wrapping=20to=20keep=20line=20number=E2=80=A6=20(#8087)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/themes/PlaygroundEditorTheme.css | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/lexical-playground/src/themes/PlaygroundEditorTheme.css b/packages/lexical-playground/src/themes/PlaygroundEditorTheme.css index 01ad0cb681d..09ac247588e 100644 --- a/packages/lexical-playground/src/themes/PlaygroundEditorTheme.css +++ b/packages/lexical-playground/src/themes/PlaygroundEditorTheme.css @@ -166,28 +166,37 @@ background-color: rgb(240, 242, 245); font-family: Menlo, Consolas, Monaco, monospace; display: block; - padding: 8px 8px 8px 52px; line-height: 1.53; font-size: 13px; + padding-top: 8px; margin: 0; margin-top: 8px; margin-bottom: 8px; overflow-x: auto; position: relative; tab-size: 2; + white-space: pre; + max-width: 100%; + box-sizing: border-box; } .PlaygroundEditorTheme__code:before { content: attr(data-gutter); - position: absolute; + position: sticky; background-color: #eee; left: 0; + float: left; top: 0; + z-index: 3; + min-height: 100%; border-right: 1px solid #ccc; padding: 8px; color: #777; white-space: pre-wrap; text-align: right; min-width: 25px; + margin-right: 10px; + margin-top: -8px; + padding: 8px; } .PlaygroundEditorTheme__tableScrollableWrapper { overflow-x: auto;