From 5c7cf02457d0772ce3aa6ed6f5219ab0841f3b13 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Fri, 2 Sep 2022 14:43:19 +0100 Subject: [PATCH] Table of contents style tweaks * Make "X comments" appear on a new line deliberately * Remove parentheses around "X comments" Bug: T309463 Change-Id: I803eee9db59c633f129f15e436242a12bcc627f0 --- includes/CommentFormatter.php | 2 +- modules/dt.init.less | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/includes/CommentFormatter.php b/includes/CommentFormatter.php index 10b2d8f13..533980985 100644 --- a/includes/CommentFormatter.php +++ b/includes/CommentFormatter.php @@ -82,7 +82,7 @@ class CommentFormatter { $summary = Html::element( 'span', [ 'class' => 'ext-discussiontools-init-sidebar-meta' - ], wfMessage( 'parentheses', $commentCount )->inLanguage( $lang )->text() ); + ], $commentCount ); // This also shows up in API action=parse&prop=sections output. $item['html-summary'] = $summary; diff --git a/modules/dt.init.less b/modules/dt.init.less index 178bc7543..03cbdcb23 100644 --- a/modules/dt.init.less +++ b/modules/dt.init.less @@ -325,19 +325,13 @@ h1, h2, h3, h4, h5, h6 { display: block; } - // stylelint-disable-next-line selector-class-pattern - .sidebar-toc .sidebar-toc-text { - display: inline; - } - // stylelint-disable-next-line selector-class-pattern .sidebar-toc .sidebar-toc-list-item { - padding-top: 4px; - padding-bottom: 4px; + margin: 8px 0; } .ext-discussiontools-init-sidebar-meta { - display: inline; + display: block; color: #666; white-space: nowrap; font-size: 0.875em;