From 3ed3cbb806e7e32408d0f8a9084f5531d9f57aa7 Mon Sep 17 00:00:00 2001 From: Claude Fable 5 Date: Sun, 19 Jul 2026 17:54:02 +0200 Subject: [PATCH] =?UTF-8?q?#137=20Nachfix=202:=20Task-Item-Abs=C3=A4tze=20?= =?UTF-8?q?per=20Nachfahren-Selektor=20treffen=20(NodeView-Tiefe)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stefan sah die Checkbox-Verschiebung weiterhin — in der ANGEMELDETEN Lese-/Bearbeiten-Ansicht. Dort rendert der TipTap-ReactNodeView das

ZWEI Wrapper tief (`li > div[data-node-view-content] > div > p`), die bisherige Kind-Kette `li > div > p` griff also nur im flachen docToHtml-Markup der öffentlichen Ansicht. Fix: Nachfahren-Selektoren (`li p:first-of-type` / `li p:last-of-type`) — robust gegen die Wrapper-Tiefe beider Renderpfade. Live am echten NodeView-DOM verifiziert (Injektion auf Test: p-marginTop 16px→0, Checkbox bündig; öffentlicher Pfad unverändert ok). Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_0155v2aT8AG1kZDQEZiCLBWC --- apps/web/src/styles/base.css | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/apps/web/src/styles/base.css b/apps/web/src/styles/base.css index 908cd9e..d217318 100644 --- a/apps/web/src/styles/base.css +++ b/apps/web/src/styles/base.css @@ -1623,25 +1623,26 @@ ul[data-type='task_list'] li { } /* The checkbox is the top flex child; nudge it onto the first text line and - drop the leading/trailing margins of the item's paragraph so the text meets - the checkbox instead of dropping a line. Covers both DOM shapes: read-mode - `li > input` + `li > p`, and editor `li > label > input` + `li > div > p`. - Uses `:first-of-type`/`:last-of-type` (NOT `:first-child`): in the read-mode - markup the `` is the first child, so the paragraph is never - `:first-child` and a `:first-child` reset would silently miss (issue #137). */ + drop the leading/trailing margins of the item's paragraphs so the text meets + the checkbox instead of dropping a line. DESCENDANT selectors on purpose + (issue #137, second regression): the DOM depth differs per surface — + public/docToHtml renders `li > input` + `li > p`, but the editor/auth read + view (TipTap ReactNodeView) nests the paragraph TWO wrappers deep: + `li > div[data-node-view-content] > div > p`. Child-combinator chains keep + missing one of the shapes; matching any `p` inside the task item is the + robust form. `:first-of-type`/`:last-of-type` (NOT `:first-child`) because + the ``/`