From 55108aaf1bfff81b1cd9636540e0e9a3c58a4827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Thu, 5 Jul 2018 17:32:37 +0200 Subject: [PATCH] Apply edit surface jQuery.makeCollapsible overrides to visual diffs too Bug: T194725 Change-Id: I8667dae42e652ef08910c861d22606f482d8f9cd --- .../ce/styles/nodes/ve.ce.MWTableNode.css | 21 --------------- .../ve-mw/init/styles/ve.init.mw.Target.css | 27 +++++++++++++++++++ 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/modules/ve-mw/ce/styles/nodes/ve.ce.MWTableNode.css b/modules/ve-mw/ce/styles/nodes/ve.ce.MWTableNode.css index 94a13268ba..2b4b6ef8ce 100644 --- a/modules/ve-mw/ce/styles/nodes/ve.ce.MWTableNode.css +++ b/modules/ve-mw/ce/styles/nodes/ve.ce.MWTableNode.css @@ -13,24 +13,3 @@ .ve-ce-mwTableNode.jquery-tablesorter th.ve-ce-tableCellNode-header.ve-ce-tableCellNode-editing.headerSort { cursor: text; } - -/* Prevent jQuery.makeCollapsible from hiding the rows, even if collapsed by default */ -.client-js .ve-ce-mwTableNode.mw-collapsed:not( .mw-made-collapsible ) tr:not( :first-child ) { - display: table-row; -} - -.client-js .ve-ce-mwTableNode.mw-collapsed:not( .mw-made-collapsible ) > thead + tbody { - display: table-row-group; -} - -/* - * Grey out the fake toggles to make it more obvious they are not interactive. - * Don't bother trying to float the toggles, as the text they are floating around - * is now paragraph wrapped. Making these paragraphs display:inline would fix the - * rendering but causes them to be destroyed by the CE when empty (T197987). - */ -.ve-ce-mwTableNode.mw-collapsible :first-child tr:first-child th:last-child:before, -.ve-ce-mwTableNode.mw-collapsible > caption:first-child:after { - color: #999; - float: none; -} diff --git a/modules/ve-mw/init/styles/ve.init.mw.Target.css b/modules/ve-mw/init/styles/ve.init.mw.Target.css index 087fc802c6..9399675d17 100644 --- a/modules/ve-mw/init/styles/ve.init.mw.Target.css +++ b/modules/ve-mw/init/styles/ve.init.mw.Target.css @@ -23,3 +23,30 @@ .ve-init-target-ie .ve-ce-surface h6 { overflow: visible; } + +/* Override MediaWiki's styles that make sense in read mode only */ + +/* Prevent jQuery.makeCollapsible from hiding the rows, even if collapsed by default */ +.client-js .ve-ce-mwTableNode.mw-collapsed:not( .mw-made-collapsible ) tr:not( :first-child ), +.client-js .ve-ui-diffElement table.mw-collapsed:not( .mw-made-collapsible ) tr:not( :first-child ) { + display: table-row; +} + +.client-js .ve-ce-mwTableNode.mw-collapsed:not( .mw-made-collapsible ) > thead + tbody, +.client-js .ve-ui-diffElement table.mw-collapsed:not( .mw-made-collapsible ) > thead + tbody { + display: table-row-group; +} + +/* + * Grey out the fake toggles to make it more obvious they are not interactive. + * Don't bother trying to float the toggles, as the text they are floating around + * is now paragraph wrapped. Making these paragraphs display:inline would fix the + * rendering but causes them to be destroyed by the CE when empty (T197987). + */ +.ve-ce-mwTableNode.mw-collapsible :first-child tr:first-child th:last-child:before, +.ve-ce-mwTableNode.mw-collapsible > caption:first-child:after, +.ve-ui-diffElement table.mw-collapsible :first-child tr:first-child th:last-child:before, +.ve-ui-diffElement table.mw-collapsible > caption:first-child:after { + color: #999; + float: none; +}