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 ``/`