From bb1c5792cc695b182145dab3cf73c7523b7dbcb4 Mon Sep 17 00:00:00 2001 From: mrjo118 Date: Sat, 15 Nov 2025 09:02:36 +0000 Subject: [PATCH] Mobile: Fixes #13637: Fix incorrect zebra striping on tables in the rich text editor (#13663) --- packages/editor/ProseMirror/styles/table.css | 5 +++++ packages/renderer/noteStyle.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/editor/ProseMirror/styles/table.css b/packages/editor/ProseMirror/styles/table.css index 613718255e..e4c7fda1c9 100644 --- a/packages/editor/ProseMirror/styles/table.css +++ b/packages/editor/ProseMirror/styles/table.css @@ -9,3 +9,8 @@ table .selectedCell { th > p:only-child, td > p:only-child { margin: unset; } + +/* Tables used with ProseMirror do not have a thead, so zebra striping needs be styled separately to the global noteStyle css */ +table tr:nth-child(odd) { + background-color: var(--joplin-table-background-color); +} \ No newline at end of file diff --git a/packages/renderer/noteStyle.ts b/packages/renderer/noteStyle.ts index 7686913b93..92d15d4f3c 100644 --- a/packages/renderer/noteStyle.ts +++ b/packages/renderer/noteStyle.ts @@ -344,7 +344,7 @@ export default function(theme: any, options: Options = null) { } .jop-tinymce table tr:nth-child(even), - table tr:nth-child(even) { + table:has(thead) tr:nth-child(even) { background-color: ${theme.tableBackgroundColor}; }